Add backup script
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -7,23 +7,27 @@
|
||||
home-manager.users.${user}.programs.zsh = {
|
||||
shellAliases.nd = "nix-develop";
|
||||
|
||||
initExtra = let
|
||||
devShells = lib.strings.concatStringsSep " " (lib.attrsets.mapAttrsToList (key: _: key) inputs.self.devShells);
|
||||
in ''
|
||||
nix-develop() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: nix-develop <shell>"
|
||||
return 1
|
||||
fi
|
||||
nix develop self#"$1" -c "$SHELL"
|
||||
}
|
||||
initExtra =
|
||||
let
|
||||
devShells = lib.strings.concatStringsSep " " (
|
||||
lib.attrsets.mapAttrsToList (key: _: key) inputs.self.devShells
|
||||
);
|
||||
in
|
||||
''
|
||||
nix-develop() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: nix-develop <shell>"
|
||||
return 1
|
||||
fi
|
||||
nix develop self#"$1" -c "$SHELL"
|
||||
}
|
||||
|
||||
_nix-develop-completion() {
|
||||
local shells=(${devShells})
|
||||
compadd -- $shells
|
||||
}
|
||||
_nix-develop_completion() {
|
||||
local shells=(${devShells})
|
||||
compadd -- $shells
|
||||
}
|
||||
|
||||
compdef _nix-develop-completion nix-develop
|
||||
'';
|
||||
compdef _nix-develop_completion nix-develop
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user