From 1ca978baf4084c93f7e0ea5ff5a63f2813904ae9 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Mon, 3 Aug 2026 21:05:57 +0100 Subject: [PATCH] home: Raise stateVersion and drop dead nix.package guards Every managed home already had its stateVersion force-set per home-manager branch (22.11 for stable/mine-stable, 23.05 otherwise); pin them all to 23.05. With the floor at 23.05 the `versionAtLeast config.home.stateVersion` guards on `nix.package` are always taken, so drop them. Co-Authored-By: Claude Opus 4.8 --- home-manager/modules/common.nix | 5 ++--- lib/default.nix | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix index 09ac61b..072d259 100644 --- a/home-manager/modules/common.nix +++ b/home-manager/modules/common.nix @@ -2,7 +2,7 @@ let inherit (builtins) listToAttrs mapAttrs readFile; inherit (lib) - optionalString nameValuePair concatMapStrings concatStringsSep optionalAttrs versionAtLeast + optionalString nameValuePair concatMapStrings concatStringsSep optionalAttrs mapAttrsToList mkMerge mkIf mkDefault mkOption; inherit (lib.hm) dag; inherit (lib.my) mkOpt' dummyOption; @@ -50,7 +50,6 @@ in }; nix = { - package = mkIf (!(versionAtLeast config.home.stateVersion "22.11")) pkgs.nix; settings = with lib.my.c.nix; { experimental-features = [ "nix-command" "flakes" "ca-derivations" ]; max-jobs = mkDefault "auto"; @@ -257,7 +256,7 @@ in ssh.authKeys.files = [ lib.my.c.sshKeyFiles.me ]; }; - nix.package = mkIf (versionAtLeast config.home.stateVersion "22.05") pkgs.nix; + nix.package = pkgs.nix; fonts.fontconfig.enable = true; diff --git a/lib/default.nix b/lib/default.nix index 476e64b..5df2631 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -107,7 +107,7 @@ rec { then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}" else showWarnings config.warnings res; - homeStateVersion' = hmBranch: (if (hmBranch == "stable" || hmBranch == "mine-stable") then "22.11" else "23.05"); + homeStateVersion' = hmBranch: "23.05"; homeStateVersion = hmBranch: { # The flake passes a default setting, but we don't care about that home.stateVersion = mkForce (homeStateVersion' hmBranch);