From 3f8048a39b0e9ded178f394c3e38d0013a4e741c Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sun, 16 Mar 2025 14:13:03 +0100 Subject: nixos: autoUpgrade: don't force new flags --- modules/nixos/personal/nix.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'modules') diff --git a/modules/nixos/personal/nix.nix b/modules/nixos/personal/nix.nix index 17df364..07b0071 100644 --- a/modules/nixos/personal/nix.nix +++ b/modules/nixos/personal/nix.nix @@ -173,16 +173,7 @@ in { }) (lib.mkIf hasFlake { - # don't use system.autoUpgrade.flake, as it enables the --refresh flag - assertions = [ - { - assertion = !((config.system.autoUpgrade.channel != null)); - message = '' - The options 'system.autoUpgrade.channel' and 'personal.nix.flake' cannot both be set. - ''; - } - ]; - system.autoUpgrade.flags = lib.mkForce ["--flake ${cfg.flake}"]; + system.autoUpgrade.flake = cfg.flake; systemd.services.flake-update = lib.mkIf hasFlakeInputs (lib.mkMerge [ checkNetwork { -- cgit v1.2.3