diff options
author | Robert Helgesson <robert@rycee.net> | 2017-10-21 20:51:28 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2017-10-24 01:14:22 +0200 |
commit | bf3a8c63838c998e06e6825ac80f1a9a7f735a57 (patch) | |
tree | 65ff27efd0e007961d5ff864854cbc895cf67878 /home-manager/default.nix | |
parent | 5605e46acbe06f82fe9392559ce201fa9de2e0a6 (diff) |
home-manager: point <home-manager> to project root
Before this path would point to the modules path. Using the project
root instead makes it possible to set `<home-manager>` to point to a
downloadable archive of Home Manager. This should make it
significantly easier to install and keep Home Manager up to date.
To match this change we also deprecate the Home Manager option
programs.home-manager.modulesPath
and instead ask users to use
programs.home-manager.path
Diffstat (limited to 'home-manager/default.nix')
-rw-r--r-- | home-manager/default.nix | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/home-manager/default.nix b/home-manager/default.nix index 5fed40554f7..943d61e81b2 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -1,14 +1,14 @@ { pkgs - # Extra path to the Home Manager modules. If set then this path will - # be tried before `$HOME/.config/nixpkgs/home-manager/modules` and - # `$HOME/.nixpkgs/home-manager/modules`. -, modulesPath ? null + # Extra path to Home Manager. If set then this path will be tried + # before `$HOME/.config/nixpkgs/home-manager` and + # `$HOME/.nixpkgs/home-manager`. +, path ? null }: let - modulesPathStr = if modulesPath == null then "" else modulesPath; + pathStr = if path == null then "" else path; in @@ -24,8 +24,7 @@ pkgs.stdenv.mkDerivation { --subst-var-by bash "${pkgs.bash}" \ --subst-var-by coreutils "${pkgs.coreutils}" \ --subst-var-by less "${pkgs.less}" \ - --subst-var-by MODULES_PATH '${modulesPathStr}' \ - --subst-var-by HOME_MANAGER_EXPR_PATH "${./home-manager.nix}" + --subst-var-by HOME_MANAGER_PATH '${pathStr}' ''; meta = with pkgs.stdenv.lib; { |