From 3fe449f8d899fa7a98033483fdd72a84fb2b4b6d Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sat, 28 Jan 2023 06:07:06 -0600 Subject: [PATCH] adding some automatic updates and garbage collection --- modules/base.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/base.nix b/modules/base.nix index 3ce779b..3b96f02 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -6,10 +6,25 @@ with lib; nix = { extraOptions = "experimental-features = nix-command flakes"; package = pkgs.nixFlakes; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 20d"; + }; + settings = { + auto-optimise-store = true; + }; }; - nixpkgs.config.allowUnFree = true; + system.autoUpgrade = { + enable = true; + dates = "02:00"; + allowReboot = false; + flake = "${config.users.users.chris.home}/conf"; + flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ]; + }; + # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true;