diff options
Diffstat (limited to '')
40 files changed, 1166 insertions, 190 deletions
@@ -48,11 +48,11 @@ ] }, "locked": { - "lastModified": 1764714051, - "narHash": "sha256-AjcMlM3UoavFoLzr0YrcvsIxALShjyvwe+o7ikibpCM=", + "lastModified": 1765900596, + "narHash": "sha256-+hn8v9jkkLP9m+o0Nm5SiEq10W0iWDSotH2XfjU45fA=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "a43bedcceced5c21ad36578ed823e6099af78214", + "rev": "d83c97f8f5c0aae553c1489c7d9eff3eadcadace", "type": "github" }, "original": { @@ -81,6 +81,54 @@ "type": "github" } }, + "caelestia-cli": { + "inputs": { + "caelestia-shell": [ + "caelestia-shell" + ], + "nixpkgs": [ + "caelestia-shell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767905196, + "narHash": "sha256-72Z9vz1dq9FtLc7rjU9GwErUNmKZd6ZBIX1tUznwq7U=", + "ref": "refs/heads/main", + "rev": "8056a87db5c2f6a8df23f2b6b1867471e2b8995d", + "revCount": 419, + "type": "git", + "url": "https://g.freya.cat/caelestia-cli" + }, + "original": { + "type": "git", + "url": "https://g.freya.cat/caelestia-cli" + } + }, + "caelestia-shell": { + "inputs": { + "caelestia-cli": "caelestia-cli", + "nixpkgs": [ + "nixpkgs" + ], + "quickshell": [ + "quickshell" + ] + }, + "locked": { + "lastModified": 1768240563, + "narHash": "sha256-XQ+mFInCxJffKrT7EuwRn1srMeTtOP6VtUl0Qc1FM1g=", + "ref": "refs/heads/main", + "rev": "473fa36da02bad465d2b53685efffae60b9620b7", + "revCount": 1733, + "type": "git", + "url": "https://g.freya.cat/caelestia-shell" + }, + "original": { + "type": "git", + "url": "https://g.freya.cat/caelestia-shell" + } + }, "flake-compat": { "flake": false, "locked": { @@ -98,6 +146,20 @@ } }, "flake-compat_2": { + "locked": { + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "revCount": 69, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz?rev=ff81ac966bb2cae68946d5ed5fc4994f96d0ffec&revCount=69" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1765121682, @@ -113,6 +175,24 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1754487366, + "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -178,11 +258,11 @@ ] }, "locked": { - "lastModified": 1766682973, - "narHash": "sha256-GKO35onS711ThCxwWcfuvbIBKXwriahGqs+WZuJ3v9E=", + "lastModified": 1768238716, + "narHash": "sha256-q9fkcIZ1mhtzHhEr+yBxjm9mZRvT2iNo5/fob4rD3bQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "91cdb0e2d574c64fae80d221f4bf09d5592e9ec2", + "rev": "cdf6d7d594992939b5aa239674ada74a46720edc", "type": "github" }, "original": { @@ -199,16 +279,16 @@ ] }, "locked": { - "lastModified": 1761971414, - "narHash": "sha256-UeMEUlQsil5DEtF/VQ//41vXJF9ff2xjoYVjhR6dqu4=", + "lastModified": 1767957561, + "narHash": "sha256-N0kFdc6tSE0yFeQ/Iit3KNrz4nf2K5xvP3juL7SUyhc=", "owner": "outfoxxed", "repo": "hy3", - "rev": "16dae4d8f853b0d3e8434ee9941f9fc0155b8952", + "rev": "3287049e79e9e51431de8c09f9192a18afa1bf35", "type": "github" }, "original": { "owner": "outfoxxed", - "ref": "hl0.52.0", + "ref": "hl0.53.0", "repo": "hy3", "type": "github" } @@ -280,7 +360,8 @@ "hyprland-protocols": "hyprland-protocols", "hyprlang": "hyprlang", "hyprutils": "hyprutils", - "hyprwayland-scanner": "hyprwayland-scanner_2", + "hyprwayland-scanner": "hyprwayland-scanner", + "hyprwire": "hyprwire", "nixpkgs": [ "nixpkgs" ], @@ -289,16 +370,16 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1764802770, - "narHash": "sha256-Rncrk4730flMTSczFG/MQFRgYcTaSdsJr3DGDlKEG48=", + "lastModified": 1767388857, + "narHash": "sha256-h70Tlpce8NEkwWqw/DDpeOKPzPyfq7P2t0HtGM5Z3Cw=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "386376400119dd46a767c9f8c8791fd22c7b6e61", + "rev": "ab1d80f3d6aebd57a0971b53a1993b1c1dfe0b09", "type": "github" }, "original": { "owner": "hyprwm", - "ref": "v0.52.2", + "ref": "v0.53.1", "repo": "Hyprland", "type": "github" } @@ -322,7 +403,10 @@ "hyprland", "hyprutils" ], - "hyprwayland-scanner": "hyprwayland-scanner", + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -333,11 +417,11 @@ ] }, "locked": { - "lastModified": 1764801417, - "narHash": "sha256-9RBShG2FNfBWz4Y+O/w86Iwmgu+JrNkhjsY4fsGpRtw=", + "lastModified": 1765643131, + "narHash": "sha256-CCGohW5EBIRy4B7vTyBMqPgsNcaNenVad/wszfddET0=", "owner": "hyprwm", "repo": "hyprland-guiutils", - "rev": "fff53f22dc3a5926221a00028a85acb18fb65799", + "rev": "e50ae912813bdfa8372d62daf454f48d6df02297", "type": "github" }, "original": { @@ -363,16 +447,16 @@ ] }, "locked": { - "lastModified": 1762115485, - "narHash": "sha256-hr53AWO96ooLCwS1a2v416eT1/aWQZmuQV0ULqhaBTY=", + "lastModified": 1767020608, + "narHash": "sha256-BSRT1Uu1ot4WfMfZc6KW0nwpmt2xl9wpUqmH/JoMTfk=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "bbb8d2cb0eb667f2911103eadb3d1e8176f4462c", + "rev": "d7b67e8f4ba8ebeee4ce899348fcee6291512169", "type": "github" }, "original": { "owner": "hyprwm", - "ref": "v0.52.0", + "ref": "v0.53.0", "repo": "hyprland-plugins", "type": "github" } @@ -389,11 +473,11 @@ ] }, "locked": { - "lastModified": 1759610243, - "narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=", + "lastModified": 1765214753, + "narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622", + "rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab", "type": "github" }, "original": { @@ -495,11 +579,11 @@ ] }, "locked": { - "lastModified": 1764637132, - "narHash": "sha256-vSyiKCzSY48kA3v39GFu6qgRfigjKCU/9k1KTK475gg=", + "lastModified": 1766160771, + "narHash": "sha256-roINUGikWRqqgKrD4iotKbGj3ZKJl3hjMz5l/SyKrHw=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "2f2413801beee37303913fc3c964bbe92252a963", + "rev": "5ac060bfcf2f12b3a6381156ebbc13826a05b09f", "type": "github" }, "original": { @@ -512,12 +596,10 @@ "inputs": { "nixpkgs": [ "hyprland", - "hyprland-guiutils", "nixpkgs" ], "systems": [ "hyprland", - "hyprland-guiutils", "systems" ] }, @@ -535,8 +617,12 @@ "type": "github" } }, - "hyprwayland-scanner_2": { + "hyprwire": { "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], "nixpkgs": [ "hyprland", "nixpkgs" @@ -547,26 +633,48 @@ ] }, "locked": { - "lastModified": 1763640274, - "narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=", + "lastModified": 1766253200, + "narHash": "sha256-26qPwrd3od+xoYVywSB7hC2cz9ivN46VPLlrsXyGxvE=", "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671", + "repo": "hyprwire", + "rev": "1079777525b30a947c8d657fac158e00ae85de9d", "type": "github" }, "original": { "owner": "hyprwm", - "repo": "hyprwayland-scanner", + "repo": "hyprwire", + "type": "github" + } + }, + "nix-mineral": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767736040, + "narHash": "sha256-DMte6hl0SQ/LhSIO578G8iK4RSnrxJAIJoE93sJOtS8=", + "owner": "cynicsketch", + "repo": "nix-mineral", + "rev": "39e3f2a8b58cde9e753be800d6c7b6050e84f81e", + "type": "github" + }, + "original": { + "owner": "cynicsketch", + "repo": "nix-mineral", "type": "github" } }, "nixos-hardware": { "locked": { - "lastModified": 1767070591, - "narHash": "sha256-b0aM3221Pw6vbACFqZrVzZjMNqXVPi1dvgLr8QTbajc=", + "lastModified": 1767185284, + "narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "9b3c38bf6c260d0e88154ef07fa833fa845bfd14", + "rev": "40b1a28dce561bea34858287fbb23052c3ee63fe", "type": "github" }, "original": { @@ -578,7 +686,7 @@ }, "nixos-wsl": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "nixpkgs": [ "nixpkgs" ] @@ -599,11 +707,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1766651565, - "narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=", + "lastModified": 1768127708, + "narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539", + "rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", "type": "github" }, "original": { @@ -613,6 +721,21 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1753579242, + "narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "ny": { "flake": false, "locked": { @@ -635,11 +758,11 @@ ] }, "locked": { - "lastModified": 1763988335, - "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", + "lastModified": 1765911976, + "narHash": "sha256-t3T/xm8zstHRLx+pIHxVpQTiySbKqcQbK+r+01XVKc0=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", + "rev": "b68b780b69702a090c8bb1b973bab13756cc7a27", "type": "github" }, "original": { @@ -656,11 +779,11 @@ ] }, "locked": { - "lastModified": 1766345677, - "narHash": "sha256-Mn6lF0G5r+xsgSIu+FW47djMRNG08UuTuwnRhxbZ+ek=", + "lastModified": 1767113149, + "narHash": "sha256-T4NvkU3N+2i41UENu9RuMYLJZSLE/CNuGGJEKsWXmrg=", "owner": "miguel-b-p", "repo": "preload-ng", - "rev": "ff0bdfe8f26ef7cbc2062cf4d076cd154beeaa9a", + "rev": "eb3c66a20d089ab2e3b8ff34c45c3d527584ed38", "type": "github" }, "original": { @@ -669,18 +792,41 @@ "type": "github" } }, + "quickshell": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768204289, + "narHash": "sha256-aXPr9W8AEmPz9+dH8CHIwrppKIjtS3mHyOXR2ppH/aw=", + "ref": "refs/heads/master", + "rev": "db37dc580afc9db1bc598436649c650138b6166d", + "revCount": 723, + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + }, + "original": { + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + } + }, "root": { "inputs": { "apple-fonts": "apple-fonts", "astal": "astal", + "caelestia-shell": "caelestia-shell", "home-manager": "home-manager", "hy3": "hy3", "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", + "nix-mineral": "nix-mineral", "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", "preload-ng": "preload-ng", + "quickshell": "quickshell", "rose-pine-hyprcursor": "rose-pine-hyprcursor", "sops-nix": "sops-nix", "talc": "talc", @@ -803,11 +949,11 @@ ] }, "locked": { - "lastModified": 1766289575, - "narHash": "sha256-BOKCwOQQIP4p9z8DasT5r+qjri3x7sPCOq+FTjY8Z+o=", + "lastModified": 1768104471, + "narHash": "sha256-HdnXWQsA1EI27IJlaENUEEug58trUrh6+MT0cFiDHmY=", "owner": "Mic92", "repo": "sops-nix", - "rev": "9836912e37aef546029e48c8749834735a6b9dad", + "rev": "94f9cbd20f680ebb2ad6cdf39da97cbcfaedf004", "type": "github" }, "original": { @@ -966,11 +1112,11 @@ ] }, "locked": { - "lastModified": 1766697593, - "narHash": "sha256-mGZBEN67mxeOsBhplBRLm6L+y++8jU46EEUYgemG1aQ=", + "lastModified": 1768183082, + "narHash": "sha256-XsiMOsqRLfmUi+24F7adhb/GAM2dMvplzwaW2Wxg/lo=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "98d8f48ba80a4b6e3b56addad850d57132301075", + "rev": "cdbc300fd89d503a95d1c8564de31a93d7b0a0ae", "type": "github" }, "original": { @@ -8,13 +8,13 @@ home-manager.url = "github:nix-community/home-manager/master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; # hyprland - hyprland.url = "github:hyprwm/Hyprland/v0.52.2"; + hyprland.url = "github:hyprwm/Hyprland/v0.53.1"; hyprland.inputs.nixpkgs.follows = "nixpkgs"; # hyprland plugins - hyprland-plugins.url = "github:hyprwm/hyprland-plugins/v0.52.0"; + hyprland-plugins.url = "github:hyprwm/hyprland-plugins/v0.53.0"; hyprland-plugins.inputs.hyprland.follows = "hyprland"; # hyprland hy3 - hy3.url = "github:outfoxxed/hy3/hl0.52.0"; + hy3.url = "github:outfoxxed/hy3/hl0.53.0"; hy3.inputs.hyprland.follows = "hyprland"; # sops sops-nix.url = "github:Mic92/sops-nix"; @@ -44,6 +44,16 @@ preload-ng.inputs.nixpkgs.follows = "nixpkgs"; # nixos-hardware nixos-hardware.url = "github:nixos/nixos-hardware/master"; + # nix-mineral + nix-mineral.url = "github:cynicsketch/nix-mineral"; + nix-mineral.inputs.nixpkgs.follows = "nixpkgs"; + # quickshell + quickshell.url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; + quickshell.inputs.nixpkgs.follows = "nixpkgs"; + # caelestia-shell + caelestia-shell.url = "git+https://g.freya.cat/caelestia-shell"; + caelestia-shell.inputs.nixpkgs.follows = "nixpkgs"; + caelestia-shell.inputs.quickshell.follows = "quickshell"; }; outputs = { @@ -124,12 +134,12 @@ pkgs.alejandra ); - devShell = perSystem ( + devShells = perSystem ( pkgs: system: - pkgs.mkShell { - packages = [ - home-manager.packages.${system}.home-manager - ]; + import ./shells { + inherit pkgs; + inherit system; + inherit inputs; } ); }; diff --git a/home/apps/caelestia/default.nix b/home/apps/caelestia/default.nix new file mode 100644 index 0000000..e2e5e96 --- /dev/null +++ b/home/apps/caelestia/default.nix @@ -0,0 +1,26 @@ +{ + lib, + inputs, + config, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.caelestia; +in { + imports = [ + inputs.caelestia-shell.homeManagerModules.default + ./settings.nix + ./scheme.nix + ]; + + config = mkIf cfg.enable { + default.appLauncher = lib.mkOverride 600 "caelestia-shell ipc call drawers toggle launcher"; + default.lockScreen = lib.mkOverride 600 "caelestia-shell ipc call lock lock"; + + programs.caelestia = { + enable = true; + systemd.enable = true; + cli.enable = true; + }; + }; +} diff --git a/home/apps/caelestia/scheme.nix b/home/apps/caelestia/scheme.nix new file mode 100644 index 0000000..b454b78 --- /dev/null +++ b/home/apps/caelestia/scheme.nix @@ -0,0 +1,90 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.caelestia; + theme = config.theme.colors; +in { + config = mkIf cfg.enable { + xdg.configFile."caelestia/scheme.json".text = lib.generators.toJSON {} { + name = theme.name; + flavour = ""; + mode = "dark"; + variant = ""; + colours = { + primary_paletteKeyColor = theme.primary; + secondary_paletteKeyColor = theme.secondary; + tertiary_paletteKeyColor = theme.tertiary; + neutral_paletteKeyColor = theme.overlay; + neutral_variant_paletteKeyColor = "777680"; + background = theme.base; + onBackground = theme.text; + surface = theme.surface; + surfaceDim = theme.base; + surfaceBright = theme.overlay; + surfaceContainerLowest = theme.base; + surfaceContainerLow = theme.base; + surfaceContainer = theme.base; + surfaceContainerHigh = theme.surface; + surfaceContainerHighest = theme.overlay; + onSurface = theme.text; + surfaceVariant = theme.text; + onSurfaceVariant = theme.subtext; + inverseSurface = theme.text; + inverseOnSurface = theme.surface; + outline = theme.primary; + outlineVariant = theme.primary; + shadow = "000000"; + scrim = "000000"; + surfaceTint = theme.primary; + primary = theme.primary; + onPrimary = theme.surface; + primaryContainer = theme.primary; + onPrimaryContainer = theme.surface; + inversePrimary = theme.surface; + secondary = theme.secondary; + onSecondary = theme.surface; + secondaryContainer = theme.secondary; + onSecondaryContainer = theme.surface; + tertiary = theme.tertiary; + onTertiary = theme.surface; + tertiaryContainer = theme.tertiary; + onTertiaryContainer = theme.surface; + error = theme.error; + onError = theme.text; + errorContainer = theme.error; + onErrorContainer = theme.text; + primaryFixed = theme.primary; + primaryFixedDim = theme.primary; + onPrimaryFixed = theme.primary; + onPrimaryFixedVariant = theme.primary; + secondaryFixed = theme.secondary; + secondaryFixedDim = theme.primary; + onSecondaryFixed = theme.secondary; + onSecondaryFixedVariant = theme.secondary; + tertiaryFixed = theme.tertiary; + tertiaryFixedDim = theme.tertiary; + onTertiaryFixed = theme.tertiary; + onTertiaryFixedVariant = theme.tertiary; + term0 = theme.normal.black; + term1 = theme.normal.red; + term2 = theme.normal.green; + term3 = theme.normal.yellow; + term4 = theme.normal.blue; + term5 = theme.normal.magenta; + term6 = theme.normal.cyan; + term7 = theme.normal.white; + term8 = theme.bright.black; + term9 = theme.bright.red; + term10 = theme.bright.green; + term11 = theme.bright.yellow; + term12 = theme.bright.blue; + term13 = theme.bright.magenta; + term14 = theme.bright.cyan; + term15 = theme.bright.white; + }; + }; + }; +} diff --git a/home/apps/caelestia/settings.nix b/home/apps/caelestia/settings.nix new file mode 100644 index 0000000..fbde95d --- /dev/null +++ b/home/apps/caelestia/settings.nix @@ -0,0 +1,226 @@ +{ + config, + lib, + ... +}: let + inherit (lib) mkIf; + cfg = config.apps.caelestia; +in { + config = mkIf cfg.enable { + programs.caelestia = { + settings = { + # Look + appearance = rec { + # Rounding + rounding = let + inner = config.theme.innerRadius; + outer = config.theme.outerRadius; + in { + small = inner; + normal = outer; + large = outer + outer; + full = 1000; + }; + + # Spacing + spacing = let + diff = 5; + in { + small = padding.small + diff; + smaller = padding.smaller + diff; + normal = padding.normal + diff; + larger = padding.larger + diff; + large = padding.large + diff; + }; + + # Padding + padding = let + inner = config.theme.innerGap; + outer = config.theme.outerGap; + avg = builtins.div (outer + inner) 2; + in { + small = inner; + smaller = avg; + normal = outer; + larger = outer + inner; + large = outer + avg; + }; + + # Fontsize + font.size = let + base = config.theme.font.size; + in { + small = base - 2; + smaller = base - 1; + normal = base; + larger = base + 2; + large = base + 5; + extraLarge = base + 15; + }; + + # Animations + anim = { + durations = { + scale = 1; + }; + }; + + # Transparency + transparency = { + enabled = true; + base = config.theme.opacity; + layers = 1; + }; + }; + + # Settings + general = { + # What apps to launch + apps = { + terminal = config.default.terminal; + audio = ["pavucontrol"]; + playback = ["mpv"]; + }; + }; + + # Background + background.enabled = true; + paths = { + wallpaper = config.theme.wallpaper; + }; + + # Bar + bar = { + clock.showIcon = true; + dragThreshold = 20; + entries = + map (id: { + inherit id; + enabled = true; + }) [ + "workspaces" + "spacer" + "activeWindow" + "spacer" + "tray" + "clock" + "statusIcons" + "power" + ]; + persistent = true; + popouts = { + activeWindow = true; + statusIcons = true; + tray = true; + }; + scrollActions = { + brightness = true; + workspaces = true; + volume = true; + }; + showOnHover = true; + status = { + showAudio = false; + showBattery = true; + showBluetooth = true; + showKbLayout = false; + showMicrophone = false; + showNetwork = true; + showLockStatus = false; + }; + tray = { + background = false; + compact = false; + iconSubs = []; + recolour = false; + }; + workspaces = { + activeIndicator = true; + activeTrail = false; + perMonitorWorkspaces = true; + showWindows = false; + shown = 9; + label = ""; + occupiedLabel = ""; + activeLabel = ""; + }; + border = { + rounding = config.theme.outerRadius; + thickness = config.theme.outerGap; + }; + dashboard = { + enabled = true; + dragThreshold = 50; + mediaUpdateInterval = 500; + showOnHover = true; + }; + }; + + # Notifications + notifs = { + actionOnClick = true; + clearThreshold = 0.3; + defaultExpireTimeout = 5000; + expandThreshold = 20; + openExpanded = false; + expire = true; + }; + + # On screen display + osd = { + enabled = true; + enableBrightness = true; + enableMicrophone = false; + hideDelay = 2000; + }; + + # Services + services = { + audioIncrement = 0.1; + brightnessIncrement = 0.1; + maxVolume = 1.0; + useFahrenheit = false; + useTwelveHourClock = false; + }; + + # Logout / shutdown + session = { + dragThreshold = 30; + enabled = true; + vimKeybinds = false; + commands = { + logout = ["loginctl" "terminate-user" ""]; + shutdown = ["systemctl" "poweroff"]; + hibernate = ["systemctl" "hibernate"]; + reboot = ["systemctl" "reboot"]; + }; + }; + + # Sidebar + sidebar = { + dragThreshold = 80; + enabled = true; + }; + + # idk + utilities = { + enabled = true; + maxToasts = 4; + toasts = { + audioInputChanged = true; + audioOutputChanged = true; + capsLockChanged = true; + chargingChanged = true; + configLoaded = true; + dndChanged = true; + gameModeChanged = true; + kbLayoutChanged = true; + numLockChanged = true; + vpnChanged = true; + nowPlaying = false; + }; + }; + }; + }; + }; +} diff --git a/home/apps/default.nix b/home/apps/default.nix index 58cd117..1823b0d 100644 --- a/home/apps/default.nix +++ b/home/apps/default.nix @@ -1,5 +1,7 @@ _: { imports = [ + ./caelestia + ./rofi ./waybar ./wofi ./alacritty.nix diff --git a/home/apps/rofi/config.rasi b/home/apps/rofi/config.rasi new file mode 100644 index 0000000..8d8b1a4 --- /dev/null +++ b/home/apps/rofi/config.rasi @@ -0,0 +1,99 @@ +configuration { + modi: "drun"; + drun-match-fields: "name"; + matching: "glob"; + sort: true; + show-icons: true; + font: "JetBrainsMono Nerd Font 10"; +} + +@theme "~/.config/rofi/theme.rasi" + +window { + height: 30em; + width: 57em; + padding: @border-width; + background-color: @primary; + border-color: @primary; + border-radius: @outer-radius; +} + +mainbox { + orientation: horizontal; + children: [ "inputbar" , "listbox" ]; + background-color: @base; + border-radius: @outer-radius; +} + +inputbar { + width: 27em; + children: [ "entry" ]; + background-image: @background; +} + +entry { + enabled: false; +} + +listbox { + margin: 1em; + children: [ "dummy" , "listview" , "dummy" ]; + background-color: transparent; +} + +listview { + columns: 1; + lines: 7; + scrollbar: false; + expand: false; + fixed-height: true; + fixed-columns: true; + text-color: @text; + background-color: transparent; +} + +dummy { + background-color: transparent; +} + +element { + spacing: 1em; + padding: 0.5em 0.5em 0.5em 1.5em; + cursor: pointer; + text-color: @text; + background-color: transparent; + border-radius: @inner-radius; +} + +element selected.normal { + text-color: @surface; + background-color: @primary; +} + +element-icon { + size: 2.7em; + cursor: inherit; + text-color: inherit; + background-color: transparent; +} + +element-text { + vertical-align: 0.5; + horizontal-align: 0.0; + text-color: inherit; + background-color: transparent; +} + +error-message { + text-color: @text; + background-color: @base; + text-transform: capitalize; + children: [ "textbox" ]; +} + +textbox { + text-color: @error; + background-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} diff --git a/home/apps/rofi/default.nix b/home/apps/rofi/default.nix new file mode 100644 index 0000000..80c88a2 --- /dev/null +++ b/home/apps/rofi/default.nix @@ -0,0 +1,23 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib) mkIf; + theme = config.theme; + cfg = config.apps.rofi; +in { + config = mkIf cfg.enable { + default.appLauncher = lib.mkOverride 700 "rofi -show drun"; + + home.packages = [ + pkgs.rofi + ]; + + home.file = { + ".config/rofi/config.rasi".source = ./config.rasi; + ".config/rofi/theme.rasi".text = import ./theme.nix {inherit theme;}; + }; + }; +} diff --git a/home/apps/rofi/theme.nix b/home/apps/rofi/theme.nix new file mode 100644 index 0000000..891b5a3 --- /dev/null +++ b/home/apps/rofi/theme.nix @@ -0,0 +1,27 @@ +{theme}: let + text = "#${theme.colors.text}"; + base = "#${theme.colors.base}"; + surface = "#${theme.colors.surface}"; + primary = "#${theme.colors.primary}"; + error = "#${theme.colors.error}"; + outerGap = "${toString theme.outerGap}px"; + innerGap = "${toString theme.innerGap}px"; + outerRadius = "${toString theme.outerRadius}px"; + innerRadius = "${toString theme.innerRadius}px"; + borderWidth = "${toString theme.borderWidth}px"; + wallpaper = theme.wallpaper; +in '' + * { + primary: ${primary}; + error: ${error}; + base: ${base}; + surface: ${surface}; + text: ${text}; + inner-radius: ${innerRadius}; + outer-radius: ${outerRadius}; + inner-gap: ${innerGap}; + outer-gap: ${outerGap}; + border-width: ${borderWidth}; + background: url("${wallpaper}", height); + } +'' diff --git a/home/apps/wofi/default.nix b/home/apps/wofi/default.nix index 2de9f45..b528f65 100644 --- a/home/apps/wofi/default.nix +++ b/home/apps/wofi/default.nix @@ -7,7 +7,7 @@ cfg = config.apps.wofi; in { config = mkIf cfg.enable { - default.appLauncher = lib.mkDefault "wofi --show drun --prompt 'Seach Programs'"; + default.appLauncher = lib.mkOverride 800 "wofi --show drun --prompt 'Seach Programs' --allow-images --no-actions --normal-window"; programs.wofi = { enable = true; diff --git a/home/apps/wofi/style.nix b/home/apps/wofi/style.nix index 75a0a21..8d1fb75 100644 --- a/home/apps/wofi/style.nix +++ b/home/apps/wofi/style.nix @@ -18,7 +18,7 @@ in '' /* Window */ window { margin: 0px; - border: ${borderWidth} solid ${primary}; + border: none; border-radius: ${outerRadius}; background-color: ${base}; } diff --git a/home/default.nix b/home/default.nix index 74a7887..d9a7d52 100644 --- a/home/default.nix +++ b/home/default.nix @@ -62,6 +62,9 @@ in { # mirrored from system ++ config.extraPackages; + # only enable dconf on desktop + dconf.enable = config.desktops.enable; + xdg = { enable = true; cacheHome = "${config.homePath}/.cache"; @@ -150,6 +153,7 @@ in { CABAL_DIR = "${config.xdg.configHome}/cabal"; CABAL_CONFIG = "${config.xdg.configHome}/cabal/config"; CARGO_HOME = "${config.xdg.dataHome}/cargo"; + CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv"; DOCKER_CONFIG = "${config.xdg.configHome}/docker"; DOTNET_CLI_HOME = "${config.xdg.dataHome}/dotnet"; EM_CACHE = "${config.xdg.cacheHome}/emscripten"; diff --git a/home/desktops/default.nix b/home/desktops/default.nix index 0c2ce1c..b8777e0 100644 --- a/home/desktops/default.nix +++ b/home/desktops/default.nix @@ -66,6 +66,11 @@ in { sf-compact ]); + # set uwsm vars + xdg.configFile = { + "uwsm/env".source = "${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh"; + }; + # user fonts fonts.fontconfig = { enable = true; diff --git a/home/desktops/hyprland/binds.nix b/home/desktops/hyprland/binds.nix index df4ecc0..3266938 100644 --- a/home/desktops/hyprland/binds.nix +++ b/home/desktops/hyprland/binds.nix @@ -1,66 +1,67 @@ -{config, ...}: { +{config, ...}: let + mod = "SUPER"; +in { wayland.windowManager.hyprland.settings = { # Keybinds - "$mod" = "SUPER"; bind = [ # Launch programs - "$mod, W, exec, ${config.default.browser}" - "$mod, D, exec, ${config.default.appLauncher}" - "$mod, L, exec, ${config.default.lockScreen}" - "$mod, Return, exec, ${config.default.terminal}" + "${mod}, W, exec, ${config.default.browser}" + "${mod}, D, exec, ${config.default.appLauncher}" + "${mod}, L, exec, ${config.default.lockScreen}" + "${mod}, Return, exec, ${config.default.terminal}" ", Print, exec, grimblast copy area" # Misc - "$mod SHIFT, L, exit" - #"$mod, tab, hyprexpo:expo, toggle" + "${mod} SHIFT, L, exit" + #"${mod}, tab, hyprexpo:expo, toggle" # Window operations - "$mod SHIFT, Q, killactive" - "$mod SHIFT, SPACE, togglefloating" - "$mod, F, fullscreen" - "$mod, J, togglesplit" + "${mod} SHIFT, Q, killactive" + "${mod} SHIFT, SPACE, togglefloating" + "${mod}, F, fullscreen" + "${mod}, J, togglesplit" # Move focus with mod + arrow keys - "$mod, left, movefocus, l" - "$mod, right, movefocus, r" - "$mod, up, movefocus, u" - "$mod, down, movefocus, d" + "${mod}, left, movefocus, l" + "${mod}, right, movefocus, r" + "${mod}, up, movefocus, u" + "${mod}, down, movefocus, d" # Move window across workspace with mod + arrow keys - "$mod SHIFT, left, hy3:movewindow, l" - "$mod SHIFT, right, hy3:movewindow, r" - "$mod SHIFT, up, hy3:movewindow, u" - "$mod SHIFT, down, hy3:movewindow, d" + "${mod} SHIFT, left, hy3:movewindow, l" + "${mod} SHIFT, right, hy3:movewindow, r" + "${mod} SHIFT, up, hy3:movewindow, u" + "${mod} SHIFT, down, hy3:movewindow, d" # Switch workspaces with mod + [0-9] - "$mod, 1, workspace, 1" - "$mod, 2, workspace, 2" - "$mod, 3, workspace, 3" - "$mod, 4, workspace, 4" - "$mod, 5, workspace, 5" - "$mod, 6, workspace, 6" - "$mod, 7, workspace, 7" - "$mod, 8, workspace, 8" - "$mod, 9, workspace, 9" + "${mod}, 1, workspace, 1" + "${mod}, 2, workspace, 2" + "${mod}, 3, workspace, 3" + "${mod}, 4, workspace, 4" + "${mod}, 5, workspace, 5" + "${mod}, 6, workspace, 6" + "${mod}, 7, workspace, 7" + "${mod}, 8, workspace, 8" + "${mod}, 9, workspace, 9" # Move active window to a workspace with mod + SHIFT + [0-9] - "$mod SHIFT, 1, movetoworkspacesilent, 1" - "$mod SHIFT, 2, movetoworkspacesilent, 2" - "$mod SHIFT, 3, movetoworkspacesilent, 3" - "$mod SHIFT, 4, movetoworkspacesilent, 4" - "$mod SHIFT, 5, movetoworkspacesilent, 5" - "$mod SHIFT, 6, movetoworkspacesilent, 6" - "$mod SHIFT, 7, movetoworkspacesilent, 7" - "$mod SHIFT, 8, movetoworkspacesilent, 8" - "$mod SHIFT, 9, movetoworkspacesilent, 9" - "$mod SHIFT, 0, movetoworkspacesilent, 10" + "${mod} SHIFT, 1, movetoworkspacesilent, 1" + "${mod} SHIFT, 2, movetoworkspacesilent, 2" + "${mod} SHIFT, 3, movetoworkspacesilent, 3" + "${mod} SHIFT, 4, movetoworkspacesilent, 4" + "${mod} SHIFT, 5, movetoworkspacesilent, 5" + "${mod} SHIFT, 6, movetoworkspacesilent, 6" + "${mod} SHIFT, 7, movetoworkspacesilent, 7" + "${mod} SHIFT, 8, movetoworkspacesilent, 8" + "${mod} SHIFT, 9, movetoworkspacesilent, 9" + "${mod} SHIFT, 0, movetoworkspacesilent, 10" # Move to tab @@ -75,14 +76,14 @@ "LALT, 9, hy3:focustab, index, 09" "LALT, 0, hy3:focustab, index, 10" - "$mod SHIFT, B, hy3:makegroup, h" - "$mod SHIFT, V, hy3:makegroup, v" - "$mod SHIFT, C, hy3:changegroup, toggletab" + "${mod} SHIFT, B, hy3:makegroup, h" + "${mod} SHIFT, V, hy3:makegroup, v" + "${mod} SHIFT, C, hy3:changegroup, toggletab" # Scroll through existing workspaces with mod + scroll - "$mod, mouse_down, workspace, e+1" - "$mod, mouse_up, workspace, e-1" + "${mod}, mouse_down, workspace, e+1" + "${mod}, mouse_up, workspace, e-1" ]; bindn = [ @@ -96,8 +97,8 @@ bindm = [ # Move/resize windows with mod + LMB/RMB and dragging - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" + "${mod}, mouse:272, movewindow" + "${mod}, mouse:273, resizewindow" ]; binde = [ diff --git a/home/desktops/hyprland/default.nix b/home/desktops/hyprland/default.nix index 5fd0d75..acb1529 100644 --- a/home/desktops/hyprland/default.nix +++ b/home/desktops/hyprland/default.nix @@ -25,6 +25,7 @@ in { wayland.windowManager.hyprland = { enable = true; package = inputs.hyprland.packages.${system}.hyprland; + portalPackage = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland; xwayland.enable = true; systemd.enable = true; diff --git a/home/desktops/hyprland/idle.nix b/home/desktops/hyprland/idle.nix index 0a2b951..fbdf0db 100644 --- a/home/desktops/hyprland/idle.nix +++ b/home/desktops/hyprland/idle.nix @@ -1,6 +1,6 @@ {config, ...}: { services.hypridle = { - enable = config.desktops.hyprland.enable; + enable = config.desktops.hyprland.enable && !config.apps.caelestia.enable; systemdTarget = "hyprland-session.target"; settings = { diff --git a/home/desktops/hyprland/settings.nix b/home/desktops/hyprland/settings.nix index 219467e..d285b04 100644 --- a/home/desktops/hyprland/settings.nix +++ b/home/desktops/hyprland/settings.nix @@ -65,19 +65,27 @@ enabled = true; bezier = [ - "windowIn, 0.06, 0.71, 0.25, 1" - "windowResize, 0.04, 0.67, 0.38, 1" + "default, 0.12, 0.92, 0.08, 1.0" + "wind, 0.12, 0.92, 0.08, 1.0" + "overshot, 0.18, 0.95, 0.22, 1.03" + "linear, 1, 1, 1, 1" ]; animation = [ - "windowsIn, 1, 3, windowIn, slide #popin 20%" - "windowsOut, 1, 3, windowIn, slide #popin 70%" - "windowsMove, 1, 2.5, windowResize" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 3, default" - "workspaces, 1, 6, default" - "layers, 1, 5, windowIn, slide" + "windows, 1, 5, wind, popin 60%" + "windowsIn, 1, 6, overshot, popin 60%" + "windowsOut, 1, 4, overshot, popin 60%" + "windowsMove, 1, 4, overshot, slide" + "layers, 1, 4, default, popin" + "fadeIn, 1, 7, default" + "fadeOut, 1, 7, default" + "fadeSwitch, 1, 7, default" + "fadeShadow, 1, 7, default" + "fadeDim, 1, 7, default" + "fadeLayers, 1, 7, default" + "workspaces, 1, 5, overshot, slide" + "border, 1, 1, linear" + "borderangle, 1, 24, linear, loop" ]; }; @@ -95,6 +103,24 @@ sensitivity = 0; }; + # Window rules + windowrulev2 = [ + "float,workspace 1,forclass wofi" + "noborder,forclass wofi" + ]; + + # Layer rules + layerrule = [ + "blur true, match:namespace wofi" + "ignore_alpha 0, match:namespace wofi" + "blur true, match:namespace notificaations" + "ignore_alpha 0, match:namespace notifications" + "blur true, match:namespace swaync-notificaation-window" + "ignore_alpha 0, match:namespace swaync-notification-window" + "blur true, match:namespace swaync-control-center" + "ignore_alpha 0, match:namespace swaync-control-center" + ]; + # XWayland xwayland = { force_zero_scaling = "true"; @@ -116,11 +142,6 @@ no_update_news = true; no_donation_nag = true; }; - - # Experimental - experimental = { - xx_color_management_v4 = true; - }; }; # end settings }; # end hyprland } diff --git a/home/desktops/hyprland/wallpaper.nix b/home/desktops/hyprland/wallpaper.nix index e8fc861..33fdec5 100644 --- a/home/desktops/hyprland/wallpaper.nix +++ b/home/desktops/hyprland/wallpaper.nix @@ -1,10 +1,12 @@ {config, ...}: { services.hyprpaper = { - enable = config.desktops.hyprland.enable; + enable = config.desktops.hyprland.enable && !config.apps.caelestia.enable; settings = { - preload = config.theme.wallpaper; - wallpaper = ",${config.theme.wallpaper}"; + wallpaper = { + monitor = ""; + path = config.theme.wallpaper; + }; splash = false; }; }; diff --git a/home/gtk/default.nix b/home/gtk/default.nix index 873f9de..8cbec94 100644 --- a/home/gtk/default.nix +++ b/home/gtk/default.nix @@ -39,6 +39,10 @@ in { package = pkgs.adw-gtk3; name = "adw-gtk3"; }; + iconTheme = { + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; + }; gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; }; diff --git a/home/neovim/init.lua b/home/neovim/init.lua index a97feb4..e66e523 100644 --- a/home/neovim/init.lua +++ b/home/neovim/init.lua @@ -291,19 +291,10 @@ require('nvim-surround').setup {} --[[ SYNTAX HIGHLIGHTING ]]-- -require('nvim-treesitter.configs').setup { - highlight = { - enable = true, - disable = function(lang, buf) - local max_filesize = config.highlight.max_size * 1024 - local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end, - additional_vim_regex_highlighting = true, - }, -} +vim.api.nvim_create_autocmd('FileType', { + pattern = { '<filetype>' }, + callback = function() vim.treesitter.start() end, +}) require('illuminate').configure { providers = { diff --git a/hosts/shinji/default.nix b/hosts/shinji/default.nix index 34e84ec..65222e6 100644 --- a/hosts/shinji/default.nix +++ b/hosts/shinji/default.nix @@ -3,6 +3,8 @@ { lib, pkgs, + inputs, + system, ... }: { imports = [ @@ -46,7 +48,9 @@ }; # logitech mouse udev - services.udev.extraRules = lib.fileContents ./42-logitech-unify-permissions.rules; + services.udev.packages = [ + inputs.self.packages.${system}.solaar-udev-rules + ]; # packages environment.systemPackages = with pkgs; [ @@ -64,8 +68,8 @@ # modules apps = { - astal.enable = true; - hyprlock.enable = true; + caelestia.enable = true; + rofi.enable = true; kitty.enable = true; }; browsers = { @@ -99,4 +103,5 @@ bluetooth = true; network = true; tpm = true; + hardened = false; } diff --git a/hosts/shinji/hardware.nix b/hosts/shinji/hardware.nix index f1edca2..1999c83 100644 --- a/hosts/shinji/hardware.nix +++ b/hosts/shinji/hardware.nix @@ -30,13 +30,10 @@ boot.initrd.kernelModules = [ "vfio_pci" "vfio" - "vfio_iommu_type1" ]; boot.kernelModules = ["kvm-amd"]; boot.blacklistedKernelModules = ["nouveau"]; - boot.kernelParams = [ - "amd_iommu=on" - ]; + boot.kernelParams = []; boot.extraModulePackages = []; boot.supportedFilesystems = ["ntfs"]; @@ -47,6 +44,28 @@ hardware.enableRedistributableFirmware = true; hardware.cpu.amd.updateMicrocode = true; + # nvidia + services.xserver.videoDrivers = ["nvidia"]; + hardware.nvidia = { + modesetting.enable = true; + powerManagement = { + enable = false; + finegrained = false; + }; + prime = { + sync.enable = true; + amdgpuBusId = "PCI:115:0:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + open = true; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + unfreePackages = [ + "nvidia-x11" + "nvidia-settings" + ]; + # luks device boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/ad489bfa-4280-44ea-8ad2-60347b516d60"; boot.initrd.luks.devices."swap".device = "/dev/disk/by-uuid/550e638d-eade-4d2f-aa39-c38774c91af3"; diff --git a/lib/default.nix b/lib/default.nix index 006e638..0e882dd 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -20,6 +20,7 @@ in { fingerprint network tpm + hardened minimal # Primary User user @@ -42,6 +43,17 @@ in { # Packages extraPackages ; + # fix xdg + xdg.portal = { + inherit + (config.xdg.portal) + enable + xdgOpenUsePortal + extraPortals + config + ; + }; + # bring over nix options nix = lib.mkForce { inherit (config.nix) diff --git a/options.nix b/options.nix index 5093e8b..d7ee564 100644 --- a/options.nix +++ b/options.nix @@ -71,7 +71,7 @@ with lib; let # theme color options - colorOpts = _: { + colorOpts = self: { options = { name = mkOption { type = types.str; @@ -113,6 +113,18 @@ with lib; let description = "Primary accent color"; }; + secondary = mkOption { + type = types.str; + description = "Secondary accent color"; + default = self.primary; + }; + + tertiary = mkOption { + type = types.str; + description = "tertiary accent color"; + default = self.secondary; + }; + success = mkOption { type = types.str; description = "Success color"; @@ -280,6 +292,9 @@ in { tpm = mkEnableOption { description = "Enable system TPM"; }; + hardened = mkEnableOption { + description = "Hardened the NixOS system"; + }; minimal = mkEnableOption { description = "Install only required system services, drivers, and programs."; }; @@ -463,6 +478,8 @@ in { hyprlock.enable = mkEnableOption "Enable the hyprlock lockscreen."; waybar.enable = mkEnableOption "Enable the waybar bar."; wofi.enable = mkEnableOption "Enable the wofi launcher."; + rofi.enable = mkEnableOption "Enable the rofi launcher."; + caelestia.enable = mkEnableOption "Enable the caelestia service."; }; # diff --git a/pkgs/arcanist/default.nix b/pkgs/arcanist/default.nix index 1ed7b50..9cdf8ed 100644 --- a/pkgs/arcanist/default.nix +++ b/pkgs/arcanist/default.nix @@ -1,31 +1,60 @@ -{pkgs}: -pkgs.stdenvNoCC.mkDerivation rec { +{ + lib, + stdenv, + fetchFromGitHub, + makeWrapper, + php82, + python3, + git, + diffutils, +}: +stdenv.mkDerivation rec { pname = "arcanist"; - version = "2025.18"; + version = "2025.51"; - src = pkgs.fetchFromGitHub { + src = fetchFromGitHub { owner = "phorgeit"; repo = "arcanist"; rev = version; - hash = "sha256-yiHLMcgszV9jP/8qb9X/t9Vfm3Ad7DpU55cafWPPQHY="; + hash = "sha256-muqNbQBLDOLhzVSF7vTckhb6ouIcj6tHR20CFsgv9bQ="; }; - buildInputs = with pkgs; [ + nativeBuildInputs = [makeWrapper]; + + dontBuild = true; + + buildInputs = [ php82 python3 - ]; - - propagatedInputs = with pkgs; [ git diffutils ]; + configurePhase = '' + runHook preConfigure + + patchShebangs . + + runHook postConfigure + ''; + installPhase = '' - mkdir -p $out/share/php/${pname} - mkdir -p $out/bin - cp -a * $out/share/php/${pname} - patchShebangs $out/share/php/${pname} - ln -s $out/share/php/${pname}/bin/arc $out/bin/arc - ln -sf ${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt $out/share/php/${pname}/resources/ssl/default.pem + runHook preInstall + mkdir -p $out/share/php/arcanist $out/bin + + cp --target-directory=$out/share/php/arcanist --recursive \ + bin externals resources scripts src support + + makeWrapper $out/share/php/arcanist/bin/arc $out/bin/arc \ + --inherit-argv0 \ + --chdir $out/share/php/arcanist \ + --prefix PATH : ${lib.makeBinPath buildInputs} + + makeWrapper $out/share/php/arcanist/bin/phage $out/bin/phage \ + --inherit-argv0 \ + --chdir $out/share/php/arcanist \ + --prefix PATH : ${lib.makeBinPath buildInputs} + + runHook postInstall ''; } diff --git a/pkgs/default.nix b/pkgs/default.nix index 1069328..f2bd7c6 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -16,4 +16,5 @@ in { inherit inputs options; }; libfprint-2-tod1-vfs0090 = pkgs.callPackage ./libfprint-2-tod1-vfs0090 {}; + solaar-udev-rules = pkgs.callPackage ./solaar-udev-rules {}; } diff --git a/hosts/shinji/42-logitech-unify-permissions.rules b/pkgs/solaar-udev-rules/42-logitech-unify-permissions.rules index e52c9b0..e52c9b0 100644 --- a/hosts/shinji/42-logitech-unify-permissions.rules +++ b/pkgs/solaar-udev-rules/42-logitech-unify-permissions.rules diff --git a/pkgs/solaar-udev-rules/default.nix b/pkgs/solaar-udev-rules/default.nix new file mode 100644 index 0000000..a4148a0 --- /dev/null +++ b/pkgs/solaar-udev-rules/default.nix @@ -0,0 +1,14 @@ +{stdenv}: +stdenv.mkDerivation { + name = "solaar-udev-rules"; + + src = ./.; + + dontBuild = true; + dontConfigure = true; + + installPhase = '' + mkdir -p $out/etc/udev/rules.d + cp 42-logitech-unify-permissions.rules $out/etc/udev/rules.d + ''; +} diff --git a/shells/cuda.nix b/shells/cuda.nix new file mode 100644 index 0000000..3935296 --- /dev/null +++ b/shells/cuda.nix @@ -0,0 +1,45 @@ +{ + pkgs, + lib, +}: let + nvidiaPackage = pkgs.linuxPackages_latest.nvidiaPackages.stable; + libs = with pkgs; [ + # CUDA + cudaPackages.cuda_cudart + cudaPackages.cuda_nvcc + cudaPackages.cuda_cccl + cudaPackages.cudnn + cudatoolkit + nvidiaPackage + + # OpenGL + libGLU + libGL + freeglut + + # X11 + xorg.libXi + xorg.libXmu + xorg.libXext + xorg.libX11 + xorg.libXv + xorg.libXrandr + + # Dev Tools + ffmpeg + zlib + gcc + binutils + ]; +in { + packages = libs; + LD_LIBRARY_PATH = lib.makeLibraryPath libs; + + shellHook = '' + # Nvidia Driver setup + export NVIDIA_VISIBLE_DEVICES=all + export NVIDIA_DRIVER_CAPABILITIES=compute,utility + export CUDA_VISIBLE_DEVICES=0 + export CUDA_PATH=${pkgs.cudatoolkit} + ''; +} diff --git a/shells/default.nix b/shells/default.nix new file mode 100644 index 0000000..22a7ee3 --- /dev/null +++ b/shells/default.nix @@ -0,0 +1,35 @@ +{ + pkgs, + system, + inputs, +}: { + # Default shell only containing home-manager for + # initial installs + default = pkgs.mkShell { + packages = [ + inputs.home-manager.packages.${system}.home-manager + ]; + }; + + # Loads Nvidia CUDA + cuda = pkgs.mkShell (import ./cuda.nix { + pkgs = import inputs.nixpkgs { + inherit system; + config = { + allowUnfree = true; + cudaSupport = true; + cudaVersion = "12"; + }; + }; + lib = inputs.nixpkgs.lib; + }); + + # VST development with windows VST3 support though yabridge/wine + vst = pkgs.mkShell (import ./vst.nix { + pkgs = import inputs.nixpkgs { + inherit system; + config.allowUnfree = true; + }; + lib = inputs.nixpkgs.lib; + }); +} diff --git a/shells/vst.nix b/shells/vst.nix new file mode 100644 index 0000000..3ba3326 --- /dev/null +++ b/shells/vst.nix @@ -0,0 +1,31 @@ +{ + pkgs, + lib, +}: let + libs = with pkgs; [ + # fix missing libs + gcc-unwrapped + libxcb + # fix audio + alsa-lib + pipewire + pulseaudio + # yabridge + wineWowPackages.yabridge + yabridge + yabridgectl + ]; +in { + packages = with pkgs; + [ + reaper + ] + ++ libs; + + LD_LIBRARY_PATH = lib.makeLibraryPath libs; + + shellHook = '' + export WINEPREFIX="$XDG_DATA_HOME/vst_wine"; + export NIX_PROFILES="$NIX_PROFILES ${pkgs.yabridge}"; + ''; +} diff --git a/system/battery.nix b/system/battery.nix index 42ee269..a904051 100644 --- a/system/battery.nix +++ b/system/battery.nix @@ -9,7 +9,7 @@ in { config = mkIf config.battery { # power monterting services.upower = { - enable = !config.minimal; + enable = true; percentageLow = 20; percentageCritical = 10; percentageAction = 4; @@ -17,21 +17,8 @@ in { }; # power profiles - services.tlp = { - enable = !config.minimal; - settings = { - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - - CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; - - CPU_MIN_PERF_ON_AC = 0; - CPU_MAX_PERF_ON_AC = 100; - CPU_MIN_PERF_ON_BAT = 0; - CPU_MAX_PERF_ON_BAT = 20; - }; - }; + services.power-profiles-daemon.enable = true; + #services.tlp.enable = true; # packages environment.systemPackages = with pkgs; [ diff --git a/system/default.nix b/system/default.nix index 9e8ab90..17b3f99 100644 --- a/system/default.nix +++ b/system/default.nix @@ -15,6 +15,7 @@ ./bluetooth.nix ./desktop.nix ./fingerprint.nix + ./hardened.nix ./hardware.nix ./networking.nix ./sshd.nix @@ -22,8 +23,17 @@ ]; # allow flakes - nix.settings.experimental-features = ["nix-command" "flakes"]; - nix.settings.use-xdg-base-directories = true; + nix = { + channel.enable = false; + extraOptions = '' + warn-dirty = false + ''; + settings = { + auto-optimise-store = true; + experimental-features = ["nix-command" "flakes"]; + use-xdg-base-directories = true; + }; + }; # allow defined unfree packages nixpkgs.config.allowUnfreePredicate = pkg: @@ -38,6 +48,8 @@ tmpfsSize = "50%"; }; + services.seatd.enable = true; + # use system packages in home manager home-manager.useGlobalPkgs = true; @@ -113,8 +125,11 @@ # docs documentation = { - info.enable = false; + enable = true; + doc.enable = false; + man.enable = true; dev.enable = false; + info.enable = false; nixos.enable = false; }; diff --git a/system/desktop.nix b/system/desktop.nix index 410f144..162fe94 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -28,6 +28,9 @@ in { # services services.libinput.enable = true; + # gtk portal? + programs.dconf.enable = true; + # audio / video services.pipewire = { enable = true; @@ -43,7 +46,15 @@ in { security.rtkit.enable = true; # printing - services.printing.enable = true; + services.printing = { + enable = true; + drivers = with pkgs; [ + brlaser + # FIXME: failes to compile + # cnijfilter2 + gutenprint + ]; + }; services.avahi = { enable = true; nssmdns4 = true; @@ -69,6 +80,7 @@ in { unfreePackages = [ "corefonts" "vista-fonts" + "cnijfilter2" ]; }; } diff --git a/system/desktops/hyprland.nix b/system/desktops/hyprland.nix index 26fa283..b0281a3 100644 --- a/system/desktops/hyprland.nix +++ b/system/desktops/hyprland.nix @@ -16,14 +16,18 @@ in { inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland ]; config.hyprland = { - default = ["hyprland" "gtk"]; + default = lib.mkForce ["gtk"]; + "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; "org.freedesktop.impl.portal.FileChooser" = ["gtk"]; "org.freedesktop.impl.portal.OpenURI" = ["gtk"]; + "org.freedesktop.impl.portal.Screencast" = ["hyprland"]; + "org.freedesktop.impl.portal.Screenshot" = ["hyprland"]; }; }; programs.hyprland = { enable = true; + withUWSM = true; package = inputs.hyprland.packages.${system}.hyprland; portalPackage = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland; }; diff --git a/system/desktops/sway.nix b/system/desktops/sway.nix index 501ee41..6c36c12 100644 --- a/system/desktops/sway.nix +++ b/system/desktops/sway.nix @@ -17,7 +17,10 @@ in { xdg-desktop-portal-wlr ]; config.sway = { - default = lib.mkForce ["gtk" "wlr"]; + default = lib.mkForce ["gtk"]; + "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; + "org.freedesktop.impl.portal.FileChooser" = ["gtk"]; + "org.freedesktop.impl.portal.OpenURI" = ["gtk"]; "org.freedesktop.impl.portal.Screenshot" = ["wlr"]; "org.freedesktop.impl.portal.ScreenCast" = ["wlr"]; }; @@ -30,6 +33,7 @@ in { base = false; gtk = false; }; + extraPackages = []; }; }; } diff --git a/system/desktops/wayland.nix b/system/desktops/wayland.nix index e11eca8..2f43fb3 100644 --- a/system/desktops/wayland.nix +++ b/system/desktops/wayland.nix @@ -10,12 +10,16 @@ in { config = mkIf cfg.enable { xdg.portal = { enable = true; + xdgOpenUsePortal = true; extraPortals = with pkgs; [ + xdg-desktop-portal xdg-desktop-portal-gtk ]; config.common = { - default = ["gtk"]; + default = lib.mkForce ["gtk"]; "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; + "org.freedesktop.impl.portal.FileChooser" = ["gtk"]; + "org.freedesktop.impl.portal.OpenURI" = ["gtk"]; }; }; diff --git a/system/hardened.nix b/system/hardened.nix new file mode 100644 index 0000000..223b358 --- /dev/null +++ b/system/hardened.nix @@ -0,0 +1,58 @@ +{ + lib, + config, + inputs, + ... +}: let + inherit (lib) mkIf; +in { + imports = [ + inputs.nix-mineral.nixosModules.nix-mineral + ]; + + config = mkIf config.hardened { + nix-mineral = { + enable = true; + settings = { + debug = { + coredump = true; + zram = false; + }; + network = { + icmp = { + cast = true; + ignore-all = false; + }; + }; + kernel = { + cpu-mitigations = "smt-on"; + io-uring = true; + lockdown = true; + only-signed-modules = true; + pti = true; + sysrq = "none"; + }; + system = { + yama = "relaxed"; + }; + }; + extras = { + kernel = { + intelme-kmodules = false; + }; + system = { + secure-chrony = true; + unprivileged-userns = false; + }; + }; + filesystems = { + normal = { + # let me run shell scripts + # please and thank you + "/home".options.noexec = lib.mkForce false; + "/etc".options.noexec = lib.mkForce true; + }; + }; + }; + }; +} diff --git a/system/virt/qemu.nix b/system/virt/qemu.nix index 6c068e4..64ad8c6 100644 --- a/system/virt/qemu.nix +++ b/system/virt/qemu.nix @@ -17,5 +17,9 @@ in { environment.systemPackages = with pkgs; [ qemu ]; + + networking.firewall.trustedInterfaces = [ + "virbr0" + ]; }; } diff --git a/themes/catppuccin/mocha.nix b/themes/catppuccin/mocha.nix index 2abcebb..57ef7e8 100644 --- a/themes/catppuccin/mocha.nix +++ b/themes/catppuccin/mocha.nix @@ -10,6 +10,8 @@ rec { overlay = "6c7086"; primary = normal.blue; + secondary = subtext; + tertiary = normal.pink; success = normal.green; warning = normal.yellow; error = normal.red; |