From 56ebb9007799481a0d8b724273964bf4d76f5330 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Wed, 6 Mar 2024 23:56:27 -0500 Subject: [PATCH] added custom autoupgrade and nix.gc settings for mauville --- hosts/mauville/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hosts/mauville/default.nix b/hosts/mauville/default.nix index 899399df..dfe88a7f 100644 --- a/hosts/mauville/default.nix +++ b/hosts/mauville/default.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { imports = @@ -10,12 +10,22 @@ ./hardware-configuration.nix ]; - # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "mauville"; # Define your hostname. + + system.autoUpgrade = { + allowReboot = lib.mkForce true; + dates = lib.mkForce "weekly"; + operation = lib.mkForce "boot"; + }; + + # Delete generations older than 14 days. + nix.gc = { + options = lib.mkForce "--delete-older-than 14d"; + }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions