From 9327f72096c94d9956a5e1c88f4891f8b8bceb7c Mon Sep 17 00:00:00 2001 From: Linnnus Date: Wed, 31 Jul 2024 17:56:50 +0200 Subject: ahmed: Enable automatic upgrades --- hosts/ahmed/configuration.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'hosts') diff --git a/hosts/ahmed/configuration.nix b/hosts/ahmed/configuration.nix index a07cd87..541a109 100644 --- a/hosts/ahmed/configuration.nix +++ b/hosts/ahmed/configuration.nix @@ -3,6 +3,7 @@ { config, pkgs, + flakeInputs, ... }: { imports = [ @@ -83,6 +84,21 @@ # Listen for HTTP connections. networking.firewall.allowedTCPPorts = [80 443]; + # Automatic upgrades + system.autoUpgrade = { + enable = true; + flake = flakeInputs.self.outPath; + flags = [ + "--update-input" + "nixpkgs" + "-L" # print build logs + ]; + dates = "02:00"; + randomizedDelaySec = "45min"; + allowReboot = true; + }; + + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It's perfectly fine and recommended to leave -- cgit v1.2.3