Add auto-upgrade module
This commit is contained in:
24
clanModules/auto-upgrade/roles/default.nix
Normal file
24
clanModules/auto-upgrade/roles/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.clan.autoUpgrade;
|
||||
in
|
||||
{
|
||||
options.clan.autoUpgrade = {
|
||||
flake = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Flake reference";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
system.autoUpgrade = {
|
||||
inherit (cfg.clan.autoUpgrade) flake;
|
||||
enable = true;
|
||||
dates = "02:00";
|
||||
randomizedDelaySec = "45min";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user