summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
authorAlan Pearce2017-09-17 20:30:05 +0200
committerAlan Pearce2017-09-17 20:30:05 +0200
commiteb92294f514568445b134f3fb9154c4d55f0519f (patch)
treee0ef19f310f477a5ca1bb198467b59e1ab9cdd7b /modules
parentfdad069a8c0da04dd9ff636ce5e25f028a1eaa10 (diff)
downloadnixos-configuration-eb92294f514568445b134f3fb9154c4d55f0519f.tar.lz
nixos-configuration-eb92294f514568445b134f3fb9154c4d55f0519f.tar.zst
nixos-configuration-eb92294f514568445b134f3fb9154c4d55f0519f.zip
nix: Allow auto-upgrading with unstable packages
Diffstat (limited to 'modules')
-rw-r--r--modules/nix.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/nix.nix b/modules/nix.nix
index e5353de..e1f1e16 100644
--- a/modules/nix.nix
+++ b/modules/nix.nix
@@ -18,7 +18,10 @@
   system.autoUpgrade = {
     enable = true;
   };
-  systemd.services.nixos-upgrade.script = ''
-    ${config.system.build.nixos-rebuild}/bin/nixos-rebuild boot ${toString config.system.autoUpgrade.flags}
-  '';
+  systemd.services.nixos-upgrade = {
+    environment.NIXPKGS_ALLOW_UNFREE = "1";
+    script = ''
+      ${config.system.build.nixos-rebuild}/bin/nixos-rebuild boot ${toString config.system.autoUpgrade.flags}
+    '';
+  };
 }