diff --git a/flake.lock b/flake.lock index 83f4976..8f269bf 100644 --- a/flake.lock +++ b/flake.lock @@ -54,7 +54,6 @@ "original": { "owner": "catppuccin", "repo": "vscode", - "rev": "f0a6271f62ebb868f32c7ad4ecb31104c26f987a", "type": "github" } }, @@ -120,11 +119,11 @@ ] }, "locked": { - "lastModified": 1717316182, - "narHash": "sha256-Xi0EpZcu39N0eW7apLjFfUOR9y80toyjYizez7J1wMI=", + "lastModified": 1717052710, + "narHash": "sha256-LRhOxzXmOza5SymhOgnEzA8EAQp+94kkeUYWKKpLJ/U=", "owner": "nix-community", "repo": "home-manager", - "rev": "9b53a10f4c91892f5af87cf55d08fba59ca086af", + "rev": "29c69d9a466e41d46fd3a7a9d0591ef9c113c2ae", "type": "github" }, "original": { @@ -140,16 +139,16 @@ ] }, "locked": { - "lastModified": 1716736833, - "narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=", + "lastModified": 1716729592, + "narHash": "sha256-Y3bOjoh2cFBqZN0Jw1zUdyr7tjygyxl2bD/QY73GZP0=", "owner": "nix-community", "repo": "home-manager", - "rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6", + "rev": "2c78a57c544dd19b07442350727ced097e1aa6e6", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "release-23.11", "repo": "home-manager", "type": "github" } @@ -235,11 +234,11 @@ ] }, "locked": { - "lastModified": 1717297675, - "narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=", + "lastModified": 1716772633, + "narHash": "sha256-Idcye44UW+EgjbjCoklf2IDF+XrehV6CVYvxR1omst4=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9", + "rev": "ff80cb4a11bb87f3ce8459be6f16a25ac86eb2ac", "type": "github" }, "original": { @@ -255,11 +254,11 @@ ] }, "locked": { - "lastModified": 1717297675, - "narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=", + "lastModified": 1716772633, + "narHash": "sha256-Idcye44UW+EgjbjCoklf2IDF+XrehV6CVYvxR1omst4=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9", + "rev": "ff80cb4a11bb87f3ce8459be6f16a25ac86eb2ac", "type": "github" }, "original": { @@ -270,11 +269,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1717248095, - "narHash": "sha256-e8X2eWjAHJQT82AAN+mCI0B68cIDBJpqJ156+VRrFO0=", + "lastModified": 1716987116, + "narHash": "sha256-uuEkErFVsFdg2K0cKbNQ9JlFSAm/xYqPr4rbPLI91Y8=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "7b49d3967613d9aacac5b340ef158d493906ba79", + "rev": "8251761f93d6f5b91cee45ac09edb6e382641009", "type": "github" }, "original": { @@ -302,16 +301,16 @@ }, "nixpkgs-raw": { "locked": { - "lastModified": 1717144377, - "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", + "lastModified": 1716633019, + "narHash": "sha256-xim1b5/HZYbWaZKyI7cn9TJCM6ewNVZnesRr00mXeS4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "805a384895c696f802a9bf5bf4720f37385df547", + "rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-24.05", + "ref": "nixos-23.11", "type": "indirect" } }, @@ -332,11 +331,11 @@ }, "nur": { "locked": { - "lastModified": 1717346712, - "narHash": "sha256-QjFwg6M1dBj+2DhTvDOhvvybvSxXK0fJn1FuqbWhi1o=", + "lastModified": 1717079713, + "narHash": "sha256-mvTQgi86WwALm6NGi9tvCx92zrNjSr8Mz+nCqbG0ZhE=", "owner": "nix-community", "repo": "NUR", - "rev": "8587d6c2d6bef3775387336a8456702789cbfb0b", + "rev": "1a7bbb238afcada295aabc758941ce82e6b1d292", "type": "github" }, "original": { @@ -445,11 +444,11 @@ ] }, "locked": { - "lastModified": 1717291708, - "narHash": "sha256-9oqdLMnfzywk1B2Lx6jQP6mAL6or6clVtOp+vXBsn9E=", + "lastModified": 1717032429, + "narHash": "sha256-1+87CE8xOUsJChiq9aNQqWPKoWMuyurW+aXrGbMWH7I=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "4b46d344b7a9e2d026e7da71161826cc01b9eaa8", + "rev": "0309d806a5431a46fb7fd81e20d7133ac8b1de55", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b323ae0..6b4b15c 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ url = "git+ssh://forgejo@git.everest.sable-pancake.ts.net:4222/Toast/nix-secrets"; flake = false; }; - nixpkgs-raw.url = "nixpkgs/nixos-24.05"; + nixpkgs-raw.url = "nixpkgs/nixos-23.11"; nixpkgs-unstable-raw.url = "nixpkgs/nixos-unstable"; agenix = { @@ -18,7 +18,7 @@ }; home-manager = { - url = "github:nix-community/home-manager/release-24.05"; + url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs-raw"; }; @@ -56,8 +56,7 @@ inputs.home-manager.follows = "home-manager-unstable"; }; - # The maintainer for this retired and the nix build is broken now :( - catppuccin-vsc.url = "github:catppuccin/vscode/f0a6271f62ebb868f32c7ad4ecb31104c26f987a"; + catppuccin-vsc.url = "github:catppuccin/vscode"; vscode-extensions = { url = "github:nix-community/nix-vscode-extensions"; @@ -85,7 +84,10 @@ nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { name = "patched-nixpkgs"; src = nixpkgs-raw; - patches = []; + patches = [ + ./nixpkgs-patches/0001-catppuccin-add-grub-theme.patch + ./nixpkgs-patches/0002-catppuccin-add-starship-theme.patch + ]; }; # https://discourse.nixos.org/t/proper-way-of-applying-patch-to-system-managed-via-flake/21073/26 nixpkgs-unstable = (import "${nixpkgs-unstable-patched}/flake.nix").outputs {self = inputs.self;}; diff --git a/nixpkgs-patches/0001-catppuccin-add-grub-theme.patch b/nixpkgs-patches/0001-catppuccin-add-grub-theme.patch new file mode 100644 index 0000000..3455c15 --- /dev/null +++ b/nixpkgs-patches/0001-catppuccin-add-grub-theme.patch @@ -0,0 +1,49 @@ +From 316d5e8f356d6817626bca5a37dd587418afc856 Mon Sep 17 00:00:00 2001 +From: BlankParticle +Date: Tue, 21 Nov 2023 18:14:15 +0530 +Subject: [PATCH 1/2] catppuccin: add grub theme + +--- + pkgs/data/themes/catppuccin/default.nix | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/pkgs/data/themes/catppuccin/default.nix b/pkgs/data/themes/catppuccin/default.nix +index 59e030eb9e0e..e8cdb0456d17 100644 +--- a/pkgs/data/themes/catppuccin/default.nix ++++ b/pkgs/data/themes/catppuccin/default.nix +@@ -1,5 +1,5 @@ + let +- validThemes = [ "bat" "bottom" "btop" "hyprland" "k9s" "kvantum" "lazygit" "plymouth" "refind" "rofi" "waybar" ]; ++ validThemes = [ "bat" "bottom" "btop" "grub" "hyprland" "k9s" "kvantum" "lazygit" "plymouth" "refind" "rofi" "waybar" ]; + in + { fetchFromGitHub + , lib +@@ -40,6 +40,14 @@ let + hash = "sha256-J3UezOQMDdxpflGax0rGBF/XMiKqdqZXuX4KMVGTxFk="; + }; + ++ grub = fetchFromGitHub { ++ name = "grub"; ++ owner = "catppuccin"; ++ repo = "grub"; ++ rev = "v1.0.0"; ++ hash = "sha256-/bSolCta8GCZ4lP0u5NVqYQ9Y3ZooYCNdTwORNvR7M0="; ++ }; ++ + hyprland = fetchFromGitHub { + name = "hyprland"; + owner = "catppuccin"; +@@ -140,6 +148,10 @@ stdenvNoCC.mkDerivation { + mkdir -p $out/bottom + cp "${sources.bottom}/themes/${variant}.toml" "$out/bottom/" + ++ '' + lib.optionalString (lib.elem "grub" themeList) '' ++ mkdir -p $out/grub ++ cp -r ${sources.grub}/src/catppuccin-${variant}-grub-theme/* "$out/grub/" ++ + '' + lib.optionalString (lib.elem "hyprland" themeList) '' + mkdir -p $out/hyprland + cp "${sources.hyprland}/themes/${variant}.conf" "$out/hyprland/" +-- +2.42.0 + diff --git a/nixpkgs-patches/0002-catppuccin-add-starship-theme.patch b/nixpkgs-patches/0002-catppuccin-add-starship-theme.patch new file mode 100644 index 0000000..18bcd0a --- /dev/null +++ b/nixpkgs-patches/0002-catppuccin-add-starship-theme.patch @@ -0,0 +1,49 @@ +From 93af02433861cd32221164ddb4fc03b19cbf776b Mon Sep 17 00:00:00 2001 +From: Toast <39011842+toast003@users.noreply.github.com> +Date: Sat, 13 Jan 2024 18:41:51 +0100 +Subject: [PATCH 2/2] catppuccin: add starship theme + +--- + pkgs/data/themes/catppuccin/default.nix | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/pkgs/data/themes/catppuccin/default.nix b/pkgs/data/themes/catppuccin/default.nix +index e8cdb0456d17..6ac8cc541ad3 100644 +--- a/pkgs/data/themes/catppuccin/default.nix ++++ b/pkgs/data/themes/catppuccin/default.nix +@@ -1,5 +1,5 @@ + let +- validThemes = [ "bat" "bottom" "btop" "grub" "hyprland" "k9s" "kvantum" "lazygit" "plymouth" "refind" "rofi" "waybar" ]; ++ validThemes = [ "bat" "bottom" "btop" "grub" "hyprland" "k9s" "kvantum" "lazygit" "plymouth" "refind" "rofi" "starship" "waybar" ]; + in + { fetchFromGitHub + , lib +@@ -104,6 +104,14 @@ let + hash = "sha256-DNorfyl3C4RBclF2KDgwvQQwixpTwSRu7fIvihPN8JY="; + }; + ++ starship = fetchFromGitHub { ++ name = "starship"; ++ owner = "catppuccin"; ++ repo = "starship"; ++ rev = "5629d2356f62a9f2f8efad3ff37476c19969bd4f"; ++ hash = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0="; ++ }; ++ + waybar = fetchFromGitHub { + name = "waybar"; + owner = "catppuccin"; +@@ -183,6 +191,10 @@ stdenvNoCC.mkDerivation { + cp ${sources.refind}/${variant}.conf $out/refind/ + cp -r ${sources.refind}/assets/${variant} $out/refind/assets/ + ++ '' + lib.optionalString (lib.elem "starship" themeList) '' ++ mkdir -p $out/starship ++ cp ${sources.starship}/palettes/${variant}.toml $out/starship/ ++ + '' + lib.optionalString (lib.elem "waybar" themeList) '' + mkdir -p $out/waybar + cp ${sources.waybar}/${variant}.css $out/waybar/ +-- +2.42.0 + diff --git a/roles/common/configuration.nix b/roles/common/configuration.nix index f599cd2..b370073 100755 --- a/roles/common/configuration.nix +++ b/roles/common/configuration.nix @@ -104,7 +104,7 @@ sharedModules = [flakeSelf.inputs.catppuccin.homeManagerModules.catppuccin]; users.toast = {osConfig, ...}: { catppuccin.flavour = osConfig.catppuccin.flavour; - home.stateVersion = "24.05"; + home.stateVersion = "23.11"; xdg = { enable = true; userDirs = { @@ -134,7 +134,7 @@ */ system = { - stateVersion = "24.05"; + stateVersion = "23.11"; # Nix on nixos 23.05 does not have dirtyRev configurationRevision = flakeSelf.sourceInfo.rev or flakeSelf.sourceInfo.dirtyRev or "dirty"; nixos.variant_id = lib.strings.toLower config.networking.hostName; diff --git a/roles/common/services/avahi.nix b/roles/common/services/avahi.nix index f7f33e6..5136f64 100755 --- a/roles/common/services/avahi.nix +++ b/roles/common/services/avahi.nix @@ -1,6 +1,23 @@ -{config, ...}: { - services.avahi = { - enable = true; +{config, ...}: let + old = { + nssmdns = true; + }; + new = { nssmdns4 = true; }; +in { + /* + NixOS 24.05 changed the option for mnds to be able to turn on/off IPv6 + 23.11 doesn't support this, so I need to use the conditional to be able to + use the same config for both + */ + services.avahi = + { + enable = true; + } + // ( + if config.system.nixos.release == "23.11" + then old + else new + ); }