From: Scott Worley Date: Sat, 25 Jul 2026 19:37:45 +0000 (-0700) Subject: Allow more-gentle "boot" (instead of "switch") updates X-Git-Url: http://git.scottworley.com/auto-upgrade-with-pinch/commitdiff_plain/4fa1f9a93369f086f2d8c1635f5550932f056ccc?ds=inline;hp=752d37291d831f952f4998e75b4180a4690fc979 Allow more-gentle "boot" (instead of "switch") updates Since 26.05, "switch" updates have become more violent, abruptly logging out graphical sessions. :( --- diff --git a/modules/auto-upgrade.nix b/modules/auto-upgrade.nix index 7d2404c..5f5fe3a 100644 --- a/modules/auto-upgrade.nix +++ b/modules/auto-upgrade.nix @@ -197,7 +197,7 @@ let sync # Install - hydrate ${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch + hydrate ${config.system.build.nixos-rebuild}/bin/nixos-rebuild ${cfg.operation} sync while read user;do remove_arg=-r @@ -237,6 +237,20 @@ in ''; }; + operation = lib.mkOption { + type = lib.types.enum [ + "switch" + "boot" + ]; + default = "switch"; + example = "boot"; + description = '' + Whether to run + `nixos-rebuild switch --upgrade` or run + `nixos-rebuild boot --upgrade` + ''; + }; + signingKeys = mkOption { type = types.listOf types.path; description = ''