summary refs log tree commit diff stats
path: root/nix/.config/nixpkgs
diff options
context:
space:
mode:
authorAlan Pearce2017-07-08 19:14:44 +0200
committerAlan Pearce2017-07-08 19:14:44 +0200
commitb8c5076a55617afa69abaee532948666b0c849b8 (patch)
tree37dff3a7b4e1db7f9db82f8624ffdfe6ed2eba0c /nix/.config/nixpkgs
parent07bf98c10dd5acbc70f54ba17fa0904995312310 (diff)
downloadnixfiles-b8c5076a55617afa69abaee532948666b0c849b8.tar.lz
nixfiles-b8c5076a55617afa69abaee532948666b0c849b8.tar.zst
nixfiles-b8c5076a55617afa69abaee532948666b0c849b8.zip
Nix: Use nixos-unstable for nodejs on Linux
My Laptop uses the stable channel for the system by default, but also
has the unstable channel available for when I need it.  NodeJS 8 isn't
available on the stable channel, so manually import nixos-unstable.

Other machines shouldn't be affected, as they're using nixpkgs
unstable on other OSes.
Diffstat (limited to 'nix/.config/nixpkgs')
-rw-r--r--nix/.config/nixpkgs/config.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nix/.config/nixpkgs/config.nix b/nix/.config/nixpkgs/config.nix
index dc4e40a2..11d704a9 100644
--- a/nix/.config/nixpkgs/config.nix
+++ b/nix/.config/nixpkgs/config.nix
@@ -1,11 +1,15 @@
 { pkgs }: {
   packageOverrides = super: let
     self = super.pkgs;
+    pkgsUnstable = if super.pkgs.stdenv.isLinux
+      then import <nixos-unstable> {}
+      else super.pkgs;
+
   in with self; rec {
     myEmacs = super.callPackage ./emacs.nix {
       emacs = if stdenv.isDarwin then emacs25Macport else emacs;
     };
-    nodejs = pkgs.nodejs-8_x;
+    nodejs = pkgsUnstable.nodejs-8_x;
   };
 
   allowUnfree = true;