1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-28 17:38:33 +02:00
home-manager/home-manager/install.nix
Robert Helgesson 99c900946d
Avoid substitution for some derivations
In particular, don't bother attempting to do substitution of the home
files and home generation derivations since these rarely, if ever,
could be substituted.

Fixes #330
2018-07-31 21:16:36 +02:00

40 lines
861 B
Nix

{ home-manager, pkgs }:
pkgs.runCommand
"home-manager-install"
{
propagatedBuildInputs = [ home-manager ];
preferLocalBuild = true;
allowSubstitutes = false;
shellHook = ''
echo
echo "Creating initial Home Manager generation..."
echo
if home-manager switch; then
cat <<EOF
All done! The home-manager tool should now be installed and you
can edit
''${XDG_CONFIG_HOME:-~/.config}/nixpkgs/home.nix
to configure Home Manager. Run 'man home-configuration.nix' to
see all available options.
EOF
exit 0
else
cat <<EOF
Uh oh, the installation failed! Please create an issue at
https://github.com/rycee/home-manager/issues
if the error seems to be the fault of Home Manager.
EOF
exit 1
fi
'';
}
""