From 582c5c7c1300220484c16b927350406b2f5c2c09 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Thu, 23 Jan 2025 11:15:54 +0000 Subject: [PATCH] Updated automatic update and cleanup settings --- nixos/homeserver/configuration.nix | 12 ++++++++++-- nixos/worklaptop/configuration.nix | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/nixos/homeserver/configuration.nix b/nixos/homeserver/configuration.nix index 2faf8ca..dc61d14 100644 --- a/nixos/homeserver/configuration.nix +++ b/nixos/homeserver/configuration.nix @@ -45,6 +45,11 @@ nix = { registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); nixPath = ["nixpkgs=${inputs.nixpkgs}"]; + gc = { + automatic = true; + dates = "daily"; + options = "--delete-older-than 14d"; + }; settings = { experimental-features = "nix-command flakes"; auto-optimise-store = true; @@ -245,8 +250,11 @@ }; }; - system.stateVersion = "24.11"; # Did you read the comment? - system.autoUpgrade.enable = true; + system = { + stateVersion = "24.11"; # Did you read the comment? + autoUpgrade.enable = true; + autoUpgrade.dates = "weekly"; + }; # Set user config settings users.defaultUserShell = pkgs.nushell; diff --git a/nixos/worklaptop/configuration.nix b/nixos/worklaptop/configuration.nix index 7e9533b..e7c309d 100644 --- a/nixos/worklaptop/configuration.nix +++ b/nixos/worklaptop/configuration.nix @@ -68,6 +68,11 @@ nix = { registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); nixPath = ["nixpkgs=${inputs.nixpkgs}"]; + gc = { + automatic = true; + dates = "daily"; + options = "--delete-older-than 14d"; + }; settings = { experimental-features = "nix-command flakes"; auto-optimise-store = true; @@ -359,8 +364,11 @@ }; programs.virt-manager.enable = true; - system.stateVersion = "23.11"; # Did you read the comment? - system.autoUpgrade.enable = true; + system = { + stateVersion = "23.11"; # Did you read the comment? + autoUpgrade.enable = true; + autoUpgrade.dates = "weekly"; + }; # Set user config settings users.defaultUserShell = pkgs.nushell;