home-manager: use shellHook to install

This changes the installation command from

    nix-shell $HM_PATH -A install --run 'home-manager switch'

to

    nix-shell $HM_PATH -A install

The added shell hook will print some useful information and run
`home-manager switch`.
This commit is contained in:
Robert Helgesson 2017-11-24 12:31:08 +01:00
parent a1e36a9a37
commit 06d4f39e7b
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86
3 changed files with 42 additions and 7 deletions

View file

@ -6,9 +6,7 @@ rec {
path = toString ./.;
};
install =
pkgs.runCommand
"home-manager-install"
{ propagatedBuildInputs = [ home-manager ]; }
"";
install = import ./home-manager/install.nix {
inherit home-manager pkgs;
};
}