aboutsummaryrefslogtreecommitdiff
path: root/home-manager
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2019-08-15 23:23:43 +0200
committerRobert Helgesson <robert@rycee.net>2019-08-15 23:23:43 +0200
commitfcdab6a62df47e0b23ef9bd0e4ff2a9452277f71 (patch)
tree08f94ec2ea771aa161e66b8e3af2f95f917dd8d9 /home-manager
parent5c94538c7dc800e57eb9af8ca9f251e376b4e018 (diff)
install: restrict to nix-shell
This commit adds a "build" command to the install derivation that tells the user that `nix-shell` should be used. A derivation attribute `shellHookOnly = true` is also added with the intent to indicate that the shell hook is the entire point of the derivation.
Diffstat (limited to 'home-manager')
-rw-r--r--home-manager/install.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/home-manager/install.nix b/home-manager/install.nix
index 8abf6af9e15..c58c0ba7478 100644
--- a/home-manager/install.nix
+++ b/home-manager/install.nix
@@ -6,6 +6,7 @@ runCommand
propagatedBuildInputs = [ home-manager ];
preferLocalBuild = true;
allowSubstitutes = false;
+ shellHookOnly = true;
shellHook = ''
confFile="''${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home.nix"
@@ -53,4 +54,7 @@ runCommand
fi
'';
}
- ""
+ ''
+ echo This derivation is not buildable, instead run it using nix-shell.
+ exit 1
+ ''