62 lines
1.4 KiB
Nix
62 lines
1.4 KiB
Nix
{
|
|
programs = {
|
|
nushell = {
|
|
enable = true;
|
|
environmentVariables = {
|
|
PASSWORD_STORE_DIR = "([$env.HOME, '.password-store'] | str join '/')";
|
|
};
|
|
shellAliases = {
|
|
gcal = ''
|
|
bash -c "cal $(date +%Y)"
|
|
'';
|
|
la = "ls -al";
|
|
ssh = "TERM=xterm-256color ssh";
|
|
dev = "nix develop --command $env.SHELL";
|
|
torrent = "transmission-remote";
|
|
vi = "nvim";
|
|
};
|
|
loginFile.text = ''
|
|
if (tty) == "/dev/tty1" {
|
|
sway
|
|
}
|
|
'';
|
|
extraConfig = ''
|
|
let carapace_completer = {|spans|
|
|
carapace $spans.0 nushell $spans | from json
|
|
}
|
|
$env.config = {
|
|
show_banner: false,
|
|
completions: {
|
|
quick: true
|
|
partial: true
|
|
algorithm: "fuzzy"
|
|
external: {
|
|
enable: true
|
|
max_results: 100
|
|
completer: $carapace_completer
|
|
}
|
|
}
|
|
}
|
|
$env.PATH = ($env.PATH | split row (char esep) |
|
|
append ([$env.HOME, '.local', 'bin'] | str join '/')
|
|
)
|
|
'';
|
|
};
|
|
carapace = {
|
|
enable = true;
|
|
enableNushellIntegration = true;
|
|
};
|
|
starship = {
|
|
enable = true;
|
|
enableNushellIntegration = true;
|
|
settings = {
|
|
add_newline = true;
|
|
character = {
|
|
success_symbol = "[➜](bold green)";
|
|
error_symbol = "[➜](bold red)";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|