This repository has been archived by the owner on Jan 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.nix
186 lines (154 loc) · 3.5 KB
/
home.nix
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
{ config, lib, pkgs, ... }:
let
editor = "kak";
username = "rosario";
new-terminal = pkgs.writeShellScriptBin "new-terminal" "$TERM $@ &>/dev/null &";
# $TERM sh -c "$EDITOR $@" &>/dev/null &
new-shell = pkgs.writeShellScriptBin "new-shell" "$TERM sh -c $@";
in
{
imports = [
./vim
./gpg.nix
./kakoune.nix
./archive.nix
./yubikey.nix
./git.nix
./graphical
./music.nix
];
programs.home-manager.enable = true;
home = {
enableNixpkgsReleaseCheck = true;
username = username;
homeDirectory = "/home/" + username;
stateVersion = "23.11";
sessionVariables = {
EDITOR = editor;
VISUAL = editor;
};
language = {
base = "en_US.UTF-8";
ctype = "en_US.UTF-8";
};
};
systemd.user.startServices = "sd-switch";
xdg = {
enable = true;
userDirs = {
enable = true;
createDirectories = true;
};
mime.enable = true;
mimeApps = {
enable = true;
defaultApplications = {
"text/plain" = [ "kakoune.desktop" ];
};
};
};
home.packages = with pkgs; [
nix
niv
npins
mosh
killall
xdg-utils
hunspell
hunspellDicts.en-us
htop
radeontop
haskellPackages.hasktags
universal-ctags
tmux
ripgrep
jq
rustc
cargo
wget
(aspellWithDicts (ps : [ ps.en ]))
new-terminal
new-shell
tree
ripgrep
dbeaver
socat
file
simplex-chat-desktop
];
xdg.configFile."wireplumber/bluetooth.lua.d/50-bluze-config.lua" = {
text = ''
bluez_monitor.properties = {
-- Enables bluetooth headset media controls
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]",
}
'';
};
programs = {
bash = {
enable = true;
initExtra = ''
_urlencode() {
local length="''${#1}"
for (( i = 0; i < length; i++ )); do
local c="''${1:$i:1}"
case $c in
%) printf '%%%02X' "'$c" ;;
*) printf "%s" "$c" ;;
esac
done
}
osc7_cwd() {
printf '\e]7;file://%s%s\e\\' "$HOSTNAME" "$(_urlencode "$PWD")"
}
PROMPT_COMMAND=osc7_cwd
if [[ -n "$IN_NIX_SHELL" ]]; then
export PS1="\n\[\033[1;32m\][$IN_NIX_SHELL-shell:\w]\$\[\033[0m\] "
fi
'';
};
bat.enable = true;
ssh = {
enable = true;
package = pkgs.openssh;
};
direnv = {
enable = true;
nix-direnv.enable = true;
enableBashIntegration = true;
};
broot = {
enable = true;
enableBashIntegration = true;
settings.modal = true;
};
nnn = {
enable = true;
bookmarks = {
h = "~";
d = "~/Documents";
D = "~/Downloads";
};
extraPackages = [
pkgs.ffmpegthumbnailer
pkgs.mediainfo
pkgs.sxiv
];
};
fzf = {
enable = true;
enableBashIntegration = true;
};
# TODO: Cant use rbw becuase I use 2FA and it does not seem to support it
# both rbw and bitw are lightwieght bitwarden clients with services/demons
# rbw seems like it might be a more active project and it has more attention (already packaged in nixpkgs)
# bitw provides a D-Bus service org.freedesktop.secrets which I really want!
# I need to see if I can make the two projects aware of eachother and spur them together.
rbw = {
enable = true;
settings = {
email = "[email protected]";
};
};
};
}