Add nix-develop alias

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-12-15 15:24:27 +00:00
parent d477fa4117
commit 998dc65ee2
2 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
{
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{ ... }:
{
home-manager.users.${user}.programs.zsh.initExtra = ''
nix-develop() {
if [ -z "$1" ]; then
echo "Usage: nix-develop <shell>"
return 1
fi
nix develop self#"$1" -c "$SHELL"
}
'';
}