From b923275f93004b5dcd696899790d7af7781e0295 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 7 Nov 2017 11:00:45 +0100 Subject: Use same nixpkgs configuration for unstable channel --- modules/configuration/nix.nix | 9 ++++++++- modules/development/javascript.nix | 6 +----- modules/satoshipay.nix | 6 +----- modules/user-interface.nix | 4 +--- 4 files changed, 11 insertions(+), 14 deletions(-) (limited to 'modules') diff --git a/modules/configuration/nix.nix b/modules/configuration/nix.nix index 504942ec..bed00b7a 100644 --- a/modules/configuration/nix.nix +++ b/modules/configuration/nix.nix @@ -13,11 +13,18 @@ }; }; + nixpkgs.config = { + packageOverrides = pkgs: { + unstable = import { + config = config.nixpkgs.config; + }; + }; + }; + system.autoUpgrade = { enable = true; }; systemd.services.nixos-upgrade = { - environment.NIXPKGS_ALLOW_UNFREE = "1"; script = '' ${config.system.build.nixos-rebuild}/bin/nixos-rebuild boot ${toString config.system.autoUpgrade.flags} ''; diff --git a/modules/development/javascript.nix b/modules/development/javascript.nix index 8e494c68..ebca0f4c 100644 --- a/modules/development/javascript.nix +++ b/modules/development/javascript.nix @@ -1,10 +1,6 @@ { config, pkgs, ... }: -let - pkgsUnstable = import {}; - # pkgsUnstable = pkgs; -in -{ environment.systemPackages = with pkgsUnstable; [ +{ environment.systemPackages = with pkgs.unstable; [ nodejs-8_x phantomjs2 nodePackages.yarn diff --git a/modules/satoshipay.nix b/modules/satoshipay.nix index a56deab4..81f9d43b 100644 --- a/modules/satoshipay.nix +++ b/modules/satoshipay.nix @@ -1,9 +1,5 @@ { config, pkgs, lib, ... }: -let - pkgsUnstable = import {}; - # pkgsUnstable = pkgs; -in { virtualisation = { docker = { enable = true; @@ -23,7 +19,7 @@ in docker_compose electrum robomongo - pkgsUnstable.slack + unstable.slack ]; services.mongodb = { diff --git a/modules/user-interface.nix b/modules/user-interface.nix index e0cd3e1e..e4f87100 100644 --- a/modules/user-interface.nix +++ b/modules/user-interface.nix @@ -1,11 +1,9 @@ { config, pkgs, lib, ... }: let - pkgsUnstable = import {}; - # pkgsUnstable = pkgs; emacsPackage = import ../packages/emacs.nix { inherit (pkgs) stdenv; - pkgs = pkgsUnstable; + pkgs = pkgs.unstable; emacs = pkgs.lib.overrideDerivation (pkgs.emacs.override { withGTK2 = false; withGTK3 = true; -- cgit 1.4.1