Ver código fonte

auto update/garbage collect Nix

Blaine Story 2 anos atrás
pai
commit
9ab0318d99
1 arquivos alterados com 7 adições e 1 exclusões
  1. 7 1
      roles/kodi-config/templates/configuration.nix.j2

+ 7 - 1
roles/kodi-config/templates/configuration.nix.j2

@@ -50,7 +50,6 @@
   hardware.pulseaudio.enable = true;
   boot.kernelPackages = pkgs.linuxPackages_latest; # Nix defaults to LTS kernel
 
-
   # Packages
   environment.systemPackages = with pkgs; [
     python3
@@ -72,6 +71,13 @@
 {% endfor %}
   ];
 
+  # NixOS Auto Upgrades and Cleanup
+  nix.gc.automatic = true;
+  nix.gc.dates = "monthly";
+  system.autoUpgrade.enable = true;
+  system.autoUpgrade.allowReboot = true;
+  system.autoUpgrade.dates = "weekly";
+
 
   # This value determines the NixOS release from which the default
   # settings for stateful data, like file locations and database versions