From e4723b51cdd90d82fb0d9bd91ed6e496c578630d Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Mon, 9 Jan 2017 00:47:02 +0100 Subject: [PATCH] home-manager: make modules path more configurable --- home-manager/default.nix | 3 ++- home-manager/home-manager | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/home-manager/default.nix b/home-manager/default.nix index d00edbfbd..a037c023f 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs, modulesPath ? "$HOME/.nixpkgs/home-manager/modules" }: let @@ -28,6 +28,7 @@ pkgs.stdenv.mkDerivation { substituteInPlace $out/bin/home-manager \ --subst-var-by bash "${pkgs.bash}" \ + --subst-var-by MODULES_PATH '${modulesPath}' \ --subst-var-by HOME_MANAGER_EXPR_PATH "${homeManagerExpr}" ''; diff --git a/home-manager/home-manager b/home-manager/home-manager index 440527901..f50dc446e 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -14,7 +14,7 @@ function doRebuild() { nix-build --show-trace \ "@HOME_MANAGER_EXPR_PATH@" \ - --argstr modulesPath "$HOME/.nixpkgs/home-manager/modules" \ + --argstr modulesPath "@MODULES_PATH@" \ --argstr confPath "$confFile" \ -A activation-script \ -o "$wrkdir/generation"