refactor: import nixosModules unconditionally, add enable options
This commit is contained in:
parent
c2d4ce78de
commit
850d673035
38 changed files with 959 additions and 761 deletions
|
|
@ -1,16 +1,21 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
nix = {
|
||||
optimise.automatic = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
options.my.autoupdate.enable = lib.mkEnableOption "automatic Nix GC and system upgrades";
|
||||
|
||||
config = lib.mkIf config.my.autoupdate.enable {
|
||||
nix = {
|
||||
optimise.automatic = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 7d";
|
||||
# do not forget to set `flake` when using this module!
|
||||
};
|
||||
};
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
dates = "daily";
|
||||
# do not forget to set `flake` when using this module!
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue