diff --git a/modules/auto-upgrade/default.nix b/modules/auto-upgrade/default.nix new file mode 100644 index 0000000..39bc79b --- /dev/null +++ b/modules/auto-upgrade/default.nix @@ -0,0 +1,17 @@ +{ + config, + options, + lib, + ... +}: { + system.autoUpgrade = { + enable = true; + flake = "github:aciceri/nixfleet#${config.networking.hostName}"; + flags = + lib.lists.optional + (builtins.hasAttr "ccrEmacs" options) + ["--update-input" "ccrEmacs" "ccrEmacs"]; + dates = "daily"; + allowReboot = false; + }; +} diff --git a/modules/common/default.nix b/modules/common/default.nix index eec7be5..7bd90c3 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -5,6 +5,7 @@ }: { imports = fleetModules [ "nix" + "auto-upgrade" ]; hardware.i2c.enable = true;