Add autoupgrade option, enable in onizuka
This commit is contained in:
parent
400980e6a0
commit
4135d53c14
3 changed files with 36 additions and 21 deletions
|
|
@ -5,6 +5,7 @@
|
|||
user.name = lib.mkOption { default = "pan"; };
|
||||
user.timezone = lib.mkOption { default = "America/Los_Angeles"; };
|
||||
system.extraFonts = lib.mkOption { default = []; };
|
||||
system.doAutoUpgrade = lib.mkEnableOption "Enable auto upgrading system";
|
||||
};
|
||||
|
||||
config = {
|
||||
|
|
@ -58,5 +59,20 @@
|
|||
source-han-sans # Pan-CJK font
|
||||
] ++ config.system.extraFonts;
|
||||
};
|
||||
|
||||
system.autoUpgrade = lib.mkIf config.system.doAutoUpgrade {
|
||||
enable = true;
|
||||
flake = inputs.self.outPath;
|
||||
flags = [
|
||||
"--update-input"
|
||||
"nixpkgs"
|
||||
"--commit-lock-file"
|
||||
"-L"
|
||||
];
|
||||
operation = "boot";
|
||||
dates = "22:30";
|
||||
randomizedDelaySec = "30min";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue