Add nix shell aliases

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-12-29 11:25:33 +02:00
parent 20c39024e5
commit 6d913c2ff0
6 changed files with 59 additions and 14 deletions

View File

@@ -4,13 +4,17 @@
}:
{ ... }:
{
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"
}
'';
home-manager.users.${user}.programs.zsh = {
shellAliases.nd = "nix-develop";
initExtra = ''
nix-develop() {
if [ -z "$1" ]; then
echo "Usage: nix-develop <shell>"
return 1
fi
nix develop self#"$1" -c "$SHELL"
}
'';
};
}