blob: 7ee267f1c79847c84b1d0045f328ade3ba474d0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
{
# initial version
home.stateVersion = "22.11";
# my nushell config
programs.nushell = {
# we use nushell
enable = true;
# shell config
# see https://github.com/nushell/nushell/blob/main/crates/nu-utils/src/sample_config/default_config.nu for defaults
extraConfig = ''
$env.config = {
show_banner: false
history: {
max_size: 100_000
file_format: "sqlite"
isolation: true
}
table: {
mode: none
}
}
'';
# aliases
shellAliases = {
# system build/update/cleanup
update = "sudo nixos-rebuild boot";
upgrade = "sudo nixos-rebuild boot --upgrade";
updatenow = "sudo nixos-rebuild switch";
upgradenow = "sudo nixos-rebuild switch --upgrade";
gc = "sudo nix-collect-garbage --delete-older-than 7d";
verify = "sudo nix --extra-experimental-features nix-command store verify --all";
optimize = "sudo nix --extra-experimental-features nix-command store optimise";
# list latest files last
ltr = "eza -l -s modified";
# ssh around in the local network
beta = "ssh beta.fritz.box";
betaroot = "ssh root@beta.fritz.box";
bsd = "ssh bsd.fritz.box";
bsdroot = "ssh root@bsd.fritz.box";
mac = "ssh mac.fritz.box";
macroot = "ssh root@mac.fritz.box";
mini = "ssh mini.fritz.box";
miniroot = "ssh root@mini.fritz.box";
neko = "ssh neko.fritz.box";
nekoroot = "ssh root@neko.fritz.box";
};
};
# nice prompt
# https://starship.rs/config/
# https://draculatheme.com/starship
programs.starship = {
enable = true;
enableNushellIntegration = true;
settings = {
command_timeout = 10000;
aws.style = "bold #ffb86c";
cmd_duration.style = "bold #f1fa8c";
directory.style = "bold #50fa7b";
hostname.style = "bold #ff5555";
git_branch.style = "bold #ff79c6";
git_status.style = "bold #ff5555";
username = {
format = "[$user]($style) on ";
style_user = "bold #bd93f9";
};
character = {
success_symbol = "[❯](bold #f8f8f2)";
error_symbol = "[❯](bold #ff5555)";
};
directory = {
truncation_length = 8;
truncate_to_repo = false;
};
};
};
# nice cd
programs.zoxide = {
enable = true;
enableNushellIntegration = true;
options = [ "--cmd" "cd" ];
};
# better completion
programs.carapace = {
enable = true;
enableNushellIntegration = true;
};
# better ls, adds la and Co. aliases, too
programs.eza = {
enable = true;
enableNushellIntegration = true;
};
# better cat
programs.bat = {
enable = true;
};
# better find
programs.fd = {
enable = true;
};
# file manager
programs.yazi = {
enable = true;
enableNushellIntegration = true;
};
# enable keychain, we use the main user key
programs.keychain = {
enable = true;
enableNushellIntegration = true;
keys = [ "/home/cullmann/.ssh/id_ed25519" ];
};
# https://github.com/nix-community/nix-direnv
programs.direnv = {
enable = true;
enableNushellIntegration = true;
nix-direnv.enable = true;
};
}
|