From c0594967a7870d86dd3ca36fea446227044ac761 Mon Sep 17 00:00:00 2001 From: Toast Date: Sun, 2 Jun 2024 20:27:03 +0200 Subject: [PATCH 1/5] Flake: pin catppuccin-vsc input --- flake.lock | 1 + flake.nix | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index 8f269bf..cd6704d 100644 --- a/flake.lock +++ b/flake.lock @@ -54,6 +54,7 @@ "original": { "owner": "catppuccin", "repo": "vscode", + "rev": "f0a6271f62ebb868f32c7ad4ecb31104c26f987a", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 6b4b15c..798d6c9 100644 --- a/flake.nix +++ b/flake.nix @@ -56,7 +56,8 @@ inputs.home-manager.follows = "home-manager-unstable"; }; - catppuccin-vsc.url = "github:catppuccin/vscode"; + # The maintainer for this retired and the nix build is broken now :( + catppuccin-vsc.url = "github:catppuccin/vscode/f0a6271f62ebb868f32c7ad4ecb31104c26f987a"; vscode-extensions = { url = "github:nix-community/nix-vscode-extensions"; From fd871aed7ad4ac97080287d78c6c1b8c31dbcb0f Mon Sep 17 00:00:00 2001 From: Toast Date: Mon, 3 Jun 2024 00:48:56 +0200 Subject: [PATCH 2/5] Flake: upgrade nixos-stable and home-manager to 24.05, upgrade flake --- flake.lock | 52 ++++++++++++++++++++++++++-------------------------- flake.nix | 9 +++------ 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index cd6704d..83f4976 100644 --- a/flake.lock +++ b/flake.lock @@ -120,11 +120,11 @@ ] }, "locked": { - "lastModified": 1717052710, - "narHash": "sha256-LRhOxzXmOza5SymhOgnEzA8EAQp+94kkeUYWKKpLJ/U=", + "lastModified": 1717316182, + "narHash": "sha256-Xi0EpZcu39N0eW7apLjFfUOR9y80toyjYizez7J1wMI=", "owner": "nix-community", "repo": "home-manager", - "rev": "29c69d9a466e41d46fd3a7a9d0591ef9c113c2ae", + "rev": "9b53a10f4c91892f5af87cf55d08fba59ca086af", "type": "github" }, "original": { @@ -140,16 +140,16 @@ ] }, "locked": { - "lastModified": 1716729592, - "narHash": "sha256-Y3bOjoh2cFBqZN0Jw1zUdyr7tjygyxl2bD/QY73GZP0=", + "lastModified": 1716736833, + "narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=", "owner": "nix-community", "repo": "home-manager", - "rev": "2c78a57c544dd19b07442350727ced097e1aa6e6", + "rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.11", + "ref": "release-24.05", "repo": "home-manager", "type": "github" } @@ -235,11 +235,11 @@ ] }, "locked": { - "lastModified": 1716772633, - "narHash": "sha256-Idcye44UW+EgjbjCoklf2IDF+XrehV6CVYvxR1omst4=", + "lastModified": 1717297675, + "narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "ff80cb4a11bb87f3ce8459be6f16a25ac86eb2ac", + "rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9", "type": "github" }, "original": { @@ -255,11 +255,11 @@ ] }, "locked": { - "lastModified": 1716772633, - "narHash": "sha256-Idcye44UW+EgjbjCoklf2IDF+XrehV6CVYvxR1omst4=", + "lastModified": 1717297675, + "narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "ff80cb4a11bb87f3ce8459be6f16a25ac86eb2ac", + "rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9", "type": "github" }, "original": { @@ -270,11 +270,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1716987116, - "narHash": "sha256-uuEkErFVsFdg2K0cKbNQ9JlFSAm/xYqPr4rbPLI91Y8=", + "lastModified": 1717248095, + "narHash": "sha256-e8X2eWjAHJQT82AAN+mCI0B68cIDBJpqJ156+VRrFO0=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "8251761f93d6f5b91cee45ac09edb6e382641009", + "rev": "7b49d3967613d9aacac5b340ef158d493906ba79", "type": "github" }, "original": { @@ -302,16 +302,16 @@ }, "nixpkgs-raw": { "locked": { - "lastModified": 1716633019, - "narHash": "sha256-xim1b5/HZYbWaZKyI7cn9TJCM6ewNVZnesRr00mXeS4=", + "lastModified": 1717144377, + "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e", + "rev": "805a384895c696f802a9bf5bf4720f37385df547", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "type": "indirect" } }, @@ -332,11 +332,11 @@ }, "nur": { "locked": { - "lastModified": 1717079713, - "narHash": "sha256-mvTQgi86WwALm6NGi9tvCx92zrNjSr8Mz+nCqbG0ZhE=", + "lastModified": 1717346712, + "narHash": "sha256-QjFwg6M1dBj+2DhTvDOhvvybvSxXK0fJn1FuqbWhi1o=", "owner": "nix-community", "repo": "NUR", - "rev": "1a7bbb238afcada295aabc758941ce82e6b1d292", + "rev": "8587d6c2d6bef3775387336a8456702789cbfb0b", "type": "github" }, "original": { @@ -445,11 +445,11 @@ ] }, "locked": { - "lastModified": 1717032429, - "narHash": "sha256-1+87CE8xOUsJChiq9aNQqWPKoWMuyurW+aXrGbMWH7I=", + "lastModified": 1717291708, + "narHash": "sha256-9oqdLMnfzywk1B2Lx6jQP6mAL6or6clVtOp+vXBsn9E=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "0309d806a5431a46fb7fd81e20d7133ac8b1de55", + "rev": "4b46d344b7a9e2d026e7da71161826cc01b9eaa8", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 798d6c9..b323ae0 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-23.11"; + nixpkgs-raw.url = "nixpkgs/nixos-24.05"; nixpkgs-unstable-raw.url = "nixpkgs/nixos-unstable"; agenix = { @@ -18,7 +18,7 @@ }; home-manager = { - url = "github:nix-community/home-manager/release-23.11"; + url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs-raw"; }; @@ -85,10 +85,7 @@ nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { name = "patched-nixpkgs"; src = nixpkgs-raw; - patches = [ - ./nixpkgs-patches/0001-catppuccin-add-grub-theme.patch - ./nixpkgs-patches/0002-catppuccin-add-starship-theme.patch - ]; + patches = []; }; # 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;}; From 2f3eafb1ded49fb4fa6a58bf47dcce496b250405 Mon Sep 17 00:00:00 2001 From: Toast Date: Mon, 3 Jun 2024 00:51:03 +0200 Subject: [PATCH 3/5] Common: update state version to 24.05 --- roles/common/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/common/configuration.nix b/roles/common/configuration.nix index b370073..f599cd2 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 = "23.11"; + home.stateVersion = "24.05"; xdg = { enable = true; userDirs = { @@ -134,7 +134,7 @@ */ system = { - stateVersion = "23.11"; + stateVersion = "24.05"; # 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; From 6ac0973357e3861fc88add159b86fd62523f6584 Mon Sep 17 00:00:00 2001 From: Toast Date: Mon, 3 Jun 2024 00:52:22 +0200 Subject: [PATCH 4/5] Flake: remove unneeded nixpkgs patches --- .../0001-catppuccin-add-grub-theme.patch | 49 ------------------- .../0002-catppuccin-add-starship-theme.patch | 49 ------------------- 2 files changed, 98 deletions(-) delete mode 100644 nixpkgs-patches/0001-catppuccin-add-grub-theme.patch delete mode 100644 nixpkgs-patches/0002-catppuccin-add-starship-theme.patch diff --git a/nixpkgs-patches/0001-catppuccin-add-grub-theme.patch b/nixpkgs-patches/0001-catppuccin-add-grub-theme.patch deleted file mode 100644 index 3455c15..0000000 --- a/nixpkgs-patches/0001-catppuccin-add-grub-theme.patch +++ /dev/null @@ -1,49 +0,0 @@ -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 deleted file mode 100644 index 18bcd0a..0000000 --- a/nixpkgs-patches/0002-catppuccin-add-starship-theme.patch +++ /dev/null @@ -1,49 +0,0 @@ -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 - From 7de1a1bad725bd9c0ecad970f2184b2e8c62c005 Mon Sep 17 00:00:00 2001 From: Toast Date: Mon, 3 Jun 2024 01:02:39 +0200 Subject: [PATCH 5/5] Common/avahi: remove 23.11 compatibity on config --- roles/common/services/avahi.nix | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/roles/common/services/avahi.nix b/roles/common/services/avahi.nix index 5136f64..f7f33e6 100755 --- a/roles/common/services/avahi.nix +++ b/roles/common/services/avahi.nix @@ -1,23 +1,6 @@ -{config, ...}: let - old = { - nssmdns = true; - }; - new = { +{config, ...}: { + services.avahi = { + enable = true; 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 - ); }