enable commands for nixos
This commit is contained in:
@@ -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" "$@")
|
||||
|
@@ -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;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user