diff options
author | Alan Pearce | 2017-07-08 19:14:44 +0200 |
---|---|---|
committer | Alan Pearce | 2017-07-08 19:14:44 +0200 |
commit | b8c5076a55617afa69abaee532948666b0c849b8 (patch) | |
tree | 37dff3a7b4e1db7f9db82f8624ffdfe6ed2eba0c /nix | |
parent | 07bf98c10dd5acbc70f54ba17fa0904995312310 (diff) | |
download | dotfiles-b8c5076a55617afa69abaee532948666b0c849b8.tar.lz dotfiles-b8c5076a55617afa69abaee532948666b0c849b8.tar.zst dotfiles-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')
-rw-r--r-- | nix/.config/nixpkgs/config.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nix/.config/nixpkgs/config.nix b/nix/.config/nixpkgs/config.nix index dc4e40a..11d704a 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; |