all repos — nixfiles @ eb92294f514568445b134f3fb9154c4d55f0519f

System and user configuration, managed by nix and home-manager

nix: Allow auto-upgrading with unstable packages
Alan Pearce alan@alanpearce.eu
Sun, 17 Sep 2017 20:30:05 +0200
commit

eb92294f514568445b134f3fb9154c4d55f0519f

parent

fdad069a8c0da04dd9ff636ce5e25f028a1eaa10

1 files changed, 6 insertions(+), 3 deletions(-)

jump to
M modules/nix.nixmodules/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}
+    '';
+  };
 }