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:
Felix Schröter 2022-06-26 12:47:15 +02:00
parent 99aafbd3b7
commit 4af1b35392
Signed by: felschr
GPG key ID: 671E39E6744C807D
2 changed files with 13 additions and 13 deletions

View file

@ -1,7 +1,6 @@
{ config, pkgs, lib, inputs, ... }:
{ config, pkgs, ... }:
let flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
in {
{
imports = [
./hardened.nix
./sound.nix
@ -36,12 +35,4 @@ in {
services.printing.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);
};
}

View file

@ -1,6 +1,7 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, inputs, ... }:
{
let flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
in {
nix.gc = {
automatic = true;
dates = "04:00";
@ -17,4 +18,12 @@
"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);
};
}