diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/nixos/personal/system.nix | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/nixos/personal/system.nix b/modules/nixos/personal/system.nix index 8187088..959f419 100644 --- a/modules/nixos/personal/system.nix +++ b/modules/nixos/personal/system.nix @@ -104,13 +104,11 @@ in }; }) - (lib.mkIf (cfg.autoUpgrade.enable && cfgRemote.enable) { - assertions = [ - { - assertion = hasFlake && lib.hasPrefix "git+file://" cfg.flake; - message = "Auto remote upgrade is only supported when the system is specified by a flake with path of the shape 'git+file://...'"; - } - ]; + (lib.mkIf cfgRemote.enable { + assertions = lib.optional cfg.autoUpgrade.enable ({ + assertion = hasFlake && lib.hasPrefix "git+file://" cfg.flake; + message = "Auto remote upgrade is only supported when the system is specified by a flake with path of the shape 'git+file://...'"; + }); personal.system.autoUpgrade.checkHosts = lib.mkOptionDefault [ remoteBuilder ]; |
