From 4fa1f9a93369f086f2d8c1635f5550932f056ccc Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Sat, 25 Jul 2026 12:37:45 -0700 Subject: [PATCH] Allow more-gentle "boot" (instead of "switch") updates Since 26.05, "switch" updates have become more violent, abruptly logging out graphical sessions. :( --- modules/auto-upgrade.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 = '' -- 2.51.2