feat(system): move auto upgrade config
Moved to `system/default.nix` to `system/nix.nix`, which makes it apply to home-server as well.
This commit is contained in:
parent
99aafbd3b7
commit
4af1b35392
|
@ -1,7 +1,6 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
|
{
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardened.nix
|
./hardened.nix
|
||||||
./sound.nix
|
./sound.nix
|
||||||
|
@ -36,12 +35,4 @@ in {
|
||||||
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
|
|
||||||
system.autoUpgrade = {
|
|
||||||
enable = true;
|
|
||||||
dates = "02:00";
|
|
||||||
flake = "/etc/nixos";
|
|
||||||
flags = with lib;
|
|
||||||
flatten (mapAttrsToList (n: _: [ "--update-input" n ]) flakes);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
|
|
||||||
{
|
let flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
|
||||||
|
in {
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "04:00";
|
dates = "04:00";
|
||||||
|
@ -17,4 +18,12 @@
|
||||||
"shajra.cachix.org-1:V0x7Wjgd/mHGk2KQwzXv8iydfIgLupbnZKLSQt5hh9o="
|
"shajra.cachix.org-1:V0x7Wjgd/mHGk2KQwzXv8iydfIgLupbnZKLSQt5hh9o="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.autoUpgrade = {
|
||||||
|
enable = true;
|
||||||
|
dates = "02:00";
|
||||||
|
flake = "/etc/nixos";
|
||||||
|
flags = with lib;
|
||||||
|
flatten (mapAttrsToList (n: _: [ "--update-input" n ]) flakes);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue