enable commands for nixos

This commit is contained in:
Shelvacu
2024-07-14 18:41:18 -07:00
parent 332f6aeb76
commit 86bf3807bc
2 changed files with 8 additions and 5 deletions

View File

@@ -46,17 +46,19 @@ in {
};
config = {
vacu.shell.interactiveLines = ''
function __vacushell_load() { eval "$(cat ${config.vacu.shell.functionsDir}/vacureload)"; }
__vacushell_load
unset __vacushell_load
if [[ -f ${config.vacu.shell.functionsDir}/vacureload ]]; then
function __vacushell_load() { eval "$(cat ${config.vacu.shell.functionsDir}/vacureload)"; }
__vacushell_load
unset __vacushell_load
fi
'';
vacu.packages.nd.enable = false;
vacu.packages.nd.enable = true;
vacu.packages.nd.package = writeShellFunction "nd" ''
declare -a args
args=("$@")
mkdir "''${args[@]}" && cd "''${args[-1]}"
'';
vacu.packages.td.enable = false;
vacu.packages.td.enable = true;
vacu.packages.td.package = writeShellFunction "td" ''
declare -a args
args=("-d" "$@")

View File

@@ -85,5 +85,6 @@
# commands.nix
environment.pathsToLink = [ "/share/vacufuncs" ];
vacu.shell.functionsDir = "/run/current-system/sw/share/vacufuncs";
programs.bash.interactiveShellInit = config.vacu.shell.interactiveLines;
};
}