From 4af1b35392b70fff61f27b5e8b31e8e97a6f7563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Sun, 26 Jun 2022 12:47:15 +0200 Subject: [PATCH] feat(system): move auto upgrade config Moved to `system/default.nix` to `system/nix.nix`, which makes it apply to home-server as well. --- system/default.nix | 13 ++----------- system/nix.nix | 13 +++++++++++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/system/default.nix b/system/default.nix index 7a1415c..fb3733f 100644 --- a/system/default.nix +++ b/system/default.nix @@ -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); - }; } diff --git a/system/nix.nix b/system/nix.nix index be93b9f..9e5135a 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -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); + }; }