Explorar o código

auto update/garbage collect Nix

Blaine Story %!s(int64=3) %!d(string=hai) anos
pai
achega
9ab0318d99
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  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