This commit is contained in:
Ivan Dimitrov 2024-01-29 09:14:39 +00:00
parent a2c2d2839a
commit b4528bdb38

View File

@ -2,6 +2,24 @@
programs = { programs = {
nushell = { nushell = {
enable = true; 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 = '' extraConfig = ''
let carapace_completer = {|spans| let carapace_completer = {|spans|
carapace $spans.0 nushell $spans | from json carapace $spans.0 nushell $spans | from json
@ -9,37 +27,17 @@
$env.config = { $env.config = {
show_banner: false, show_banner: false,
completions: { completions: {
case_sensitive: false # case-sensitive completions quick: true
quick: true # set to false to prevent auto-selecting completions partial: true
partial: true # set to false to prevent partial filling of the prompt algorithm: "fuzzy"
algorithm: "fuzzy" # prefix or fuzzy
external: { external: {
# set to false to prevent nushell looking into $env.PATH to find more suggestions
enable: true enable: true
# set to lower can improve completion performance at the cost of omitting some options
max_results: 100 max_results: 100
completer: $carapace_completer # check 'carapace_completer' completer: $carapace_completer
} }
} }
} }
$env.PATH = ($env.PATH |
split row (char esep) |
prepend /home/myuser/.apps |
append /usr/bin/env
)
''; '';
sessionVariables = {
PASSWORD_STORE_DIR = "$HOME/.password-store";
};
shellAliases = {
gcal = ''
bash -c "cal $(date +%Y)"
'';
ssh = "TERM=xterm-256color ssh";
dev = "nix develop --command $env.SHELL";
torrent = "transmission-remote";
vi = "nvim";
};
}; };
carapace = { carapace = {
enable = true; enable = true;
@ -47,6 +45,7 @@
}; };
starship = { starship = {
enable = true; enable = true;
enableNushellIntegration = true;
settings = { settings = {
add_newline = true; add_newline = true;
character = { character = {