diff options
Diffstat (limited to 'accounts/gkleen@sif/default.nix')
-rw-r--r-- | accounts/gkleen@sif/default.nix | 414 |
1 files changed, 268 insertions, 146 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index bcfd1224..706eb241 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix | |||
@@ -4,33 +4,6 @@ with lib; | |||
4 | 4 | ||
5 | let | 5 | let |
6 | cfg = config.home-manager.users.${userName}; | 6 | cfg = config.home-manager.users.${userName}; |
7 | emacsScratch = pkgs.stdenv.mkDerivation (sources.emacs-scratch_el // rec { | ||
8 | phases = [ "installPhase" ]; | ||
9 | |||
10 | installPhase = '' | ||
11 | mkdir -p $out/share/emacs/site-lisp | ||
12 | cp $src/scratch.el $out/share/emacs/site-lisp/default.el | ||
13 | ''; | ||
14 | }); | ||
15 | muteScript = pkgs.stdenv.mkDerivation { | ||
16 | name = "mute"; | ||
17 | src = ./scripts/mute.zsh; | ||
18 | |||
19 | buildInputs = with pkgs; [ makeWrapper ]; | ||
20 | |||
21 | phases = [ "installPhase" ]; | ||
22 | |||
23 | installPhase = '' | ||
24 | mkdir -p $out/bin | ||
25 | install -m 0755 $src $out/bin/mute | ||
26 | wrapProgram $out/bin/mute \ | ||
27 | --prefix PATH : ${pkgs.zsh}/bin \ | ||
28 | --prefix PATH : ${pkgs.findutils}/bin \ | ||
29 | --prefix PATH : ${pkgs.util-linux}/bin \ | ||
30 | --prefix PATH : ${pkgs.coreutils}/bin \ | ||
31 | --prefix PATH : ${pkgs.pulseaudio}/bin | ||
32 | ''; | ||
33 | }; | ||
34 | wrapElectron = { package, bin ? package.meta.mainProgram or package.pname or (pkgs.lib.strings.nameFromURL package.name "-"), outBin ? bin, sandbox ? true }: pkgs.symlinkJoin { | 7 | wrapElectron = { package, bin ? package.meta.mainProgram or package.pname or (pkgs.lib.strings.nameFromURL package.name "-"), outBin ? bin, sandbox ? true }: pkgs.symlinkJoin { |
35 | name = "${package.name}-wrapped"; | 8 | name = "${package.name}-wrapped"; |
36 | buildInputs = with pkgs; [ makeWrapper ]; | 9 | buildInputs = with pkgs; [ makeWrapper ]; |
@@ -47,10 +20,6 @@ let | |||
47 | ''; | 20 | ''; |
48 | }; | 21 | }; |
49 | 22 | ||
50 | wrappedChrome = wrapElectron { package = pkgs.google-chrome; outBin = "google-chrome"; }; | ||
51 | wrappedZulip = wrapElectron { package = pkgs.zulip; bin = "zulip"; outBin = "zulip"; }; | ||
52 | wrappedElementDesktop = wrapElectron { package = pkgs.element-desktop; bin = "element-desktop"; }; | ||
53 | wrappedRocketChatDesktop = wrapElectron { package = pkgs.rocketchat-desktop; bin = "rocketchat-desktop"; outBin = "rocketchat"; }; | ||
54 | wrappedYTMDesktop = wrapElectron { package = pkgs.ytmdesktop; sandbox = false; }; | 23 | wrappedYTMDesktop = wrapElectron { package = pkgs.ytmdesktop; sandbox = false; }; |
55 | 24 | ||
56 | wrappedKeepassxc = pkgs.symlinkJoin { | 25 | wrappedKeepassxc = pkgs.symlinkJoin { |
@@ -63,7 +32,7 @@ let | |||
63 | text = '' | 32 | text = '' |
64 | [D-BUS Service] | 33 | [D-BUS Service] |
65 | Name=org.keepassxc.KeePassXC.MainWindow | 34 | Name=org.keepassxc.KeePassXC.MainWindow |
66 | Exec=${pkgs.coreutils}/bin/false | 35 | Exec=${lib.getExe' pkgs.coreutils "false"} |
67 | SystemdService=keepassxc.service | 36 | SystemdService=keepassxc.service |
68 | ''; | 37 | ''; |
69 | }) | 38 | }) |
@@ -73,36 +42,46 @@ let | |||
73 | text = '' | 42 | text = '' |
74 | [D-BUS Service] | 43 | [D-BUS Service] |
75 | Name=org.freedesktop.secrets | 44 | Name=org.freedesktop.secrets |
76 | Exec=${pkgs.coreutils}/bin/false | 45 | Exec=${lib.getExe' pkgs.coreutils "false"} |
77 | SystemdService=keepassxc.service | 46 | SystemdService=keepassxc.service |
78 | ''; | 47 | ''; |
79 | }) | 48 | }) |
80 | ]; | 49 | ]; |
81 | }; | 50 | }; |
82 | 51 | ||
83 | lockCommand = "${config.systemd.package}/bin/systemctl --user start gtklock.service"; | 52 | lockCommand = "${lib.getExe' config.systemd.package "systemctl"} --user start gtklock.service"; |
53 | |||
54 | editor = pkgs.symlinkJoin { | ||
55 | inherit (cfg.services.emacs.package) name; | ||
56 | buildInputs = with pkgs; [ makeWrapper ]; | ||
57 | paths = [ cfg.services.emacs.package ]; | ||
58 | postBuild = '' | ||
59 | wrapProgram $out/bin/emacsclient \ | ||
60 | --inherit-argv0 \ | ||
61 | --add-flags ${lib.escapeShellArg (lib.escapeShellArgs cfg.services.emacs.client.arguments)} | ||
62 | ''; | ||
63 | }; | ||
84 | in { | 64 | in { |
85 | imports = with flake.nixosModules.userProfiles.${userName}; [ | 65 | imports = with flake.nixosModules.userProfiles.${userName}; [ |
86 | mpv yt-dlp (args: import ./xcompose.nix (inputs // args)) | 66 | zsh tmux mpv yt-dlp (args: import ./xcompose.nix (inputs // args)) |
87 | ]; | 67 | ]; |
88 | 68 | ||
89 | config = { | 69 | config = { |
90 | services.displayManager.defaultSession = "Hyprland"; # "none+xmonad"; | ||
91 | |||
92 | home-manager.users.${userName} = { | 70 | home-manager.users.${userName} = { |
93 | imports = [ | 71 | imports = [ |
94 | ./libvirt | 72 | ./libvirt |
95 | ./niri | 73 | ./niri |
74 | ./synadm | ||
96 | flakeInputs.nix-index-database.hmModules.nix-index | 75 | flakeInputs.nix-index-database.hmModules.nix-index |
97 | flakeInputs.impermanence.nixosModules.home-manager.impermanence | 76 | flakeInputs.impermanence.nixosModules.home-manager.impermanence |
98 | ]; | 77 | ]; |
99 | 78 | ||
100 | home.stateVersion = "20.09"; | 79 | home.stateVersion = "20.09"; |
101 | 80 | ||
102 | nixpkgs.config = { | 81 | # nixpkgs.config = { |
103 | allowUnfree = true; | 82 | # allowUnfree = true; |
104 | zathura.useMupdf = false; | 83 | # zathura.useMupdf = false; |
105 | }; | 84 | # }; |
106 | 85 | ||
107 | nix.registry = { | 86 | nix.registry = { |
108 | "flk" = { | 87 | "flk" = { |
@@ -112,14 +91,14 @@ in { | |||
112 | }; | 91 | }; |
113 | to = { | 92 | to = { |
114 | type = "git"; | 93 | type = "git"; |
115 | url = "file:///home/gkleen/config/nixos-flakes"; | 94 | url = "file:///home/gkleen/projects/machines"; |
116 | }; | 95 | }; |
117 | }; | 96 | }; |
118 | }; | 97 | }; |
119 | 98 | ||
120 | programs = { | 99 | programs = { |
121 | ssh = { | 100 | ssh = { |
122 | matchBlocks = import ./ssh-hosts.nix { inherit pkgs; }; # customUtils.nixImport { dir = ./ssh-hosts; }; | 101 | matchBlocks = import ./ssh-hosts.nix inputs; # customUtils.nixImport { dir = ./ssh-hosts; }; |
123 | extraConfig = '' | 102 | extraConfig = '' |
124 | Match host uniworx3.ifi.lmu.de,uniworx4.ifi.lmu.de,uniworx5.ifi.lmu.de,uni2workgw.ifi.lmu.de,blackbeard.tcs.ifi.lmu.de,gitlab2.rz.ifi.lmu.de,oregon.tcs.ifi.lmu.de !exec "nc -z -w 1 %h %p &>/dev/null" | 103 | Match host uniworx3.ifi.lmu.de,uniworx4.ifi.lmu.de,uniworx5.ifi.lmu.de,uni2workgw.ifi.lmu.de,blackbeard.tcs.ifi.lmu.de,gitlab2.rz.ifi.lmu.de,oregon.tcs.ifi.lmu.de !exec "nc -z -w 1 %h %p &>/dev/null" |
125 | ProxyJump remote.cip.ifi.lmu.de | 104 | ProxyJump remote.cip.ifi.lmu.de |
@@ -137,8 +116,8 @@ in { | |||
137 | ''} | 116 | ''} |
138 | 117 | ||
139 | Match host *.mathinst.loc,*.math.lmu.de !host ssh.math.lmu.de !exec "nc -z -w 1 %h %p &>/dev/null" | 118 | Match host *.mathinst.loc,*.math.lmu.de !host ssh.math.lmu.de !exec "nc -z -w 1 %h %p &>/dev/null" |
140 | # ProxyCommand ${pkgs.socat}/bin/socat - SOCKS4A:127.0.0.1:%h:%p,socksport=8118 | 119 | ProxyCommand ${lib.getExe pkgs.socat} - SOCKS4A:127.0.0.1:%h:%p,socksport=8118 |
141 | ProxyJump ssh.math.lmu.de | 120 | # ProxyJump ssh.math.lmu.de |
142 | 121 | ||
143 | Match host *.cipmath.loc !host cip04.cipmath.loc,mgmt-cls01.cipmath.loc !exec "nc -z -w 1 %h %p &>/dev/null" | 122 | Match host *.cipmath.loc !host cip04.cipmath.loc,mgmt-cls01.cipmath.loc !exec "nc -z -w 1 %h %p &>/dev/null" |
144 | ProxyJump cip04 | 123 | ProxyJump cip04 |
@@ -155,22 +134,31 @@ in { | |||
155 | 134 | ||
156 | emacs = { | 135 | emacs = { |
157 | enable = true; | 136 | enable = true; |
158 | package = pkgs.emacs29-pgtk; | 137 | package = pkgs.emacs-pgtk; |
159 | extraPackages = epkgs: with epkgs; [ | 138 | extraPackages = epkgs: with epkgs; [ |
160 | evil evil-dvorak undo-tree magit haskell-tng-mode nix-mode | 139 | evil evil-dvorak undo-tree magit haskell-tng-mode nix-mode |
161 | yaml-mode json-mode shakespeare-mode smart-mode-line | 140 | yaml-mode json-mode shakespeare-mode smart-mode-line |
162 | highlight-parentheses highlight-symbol ag sass-mode lua-mode | 141 | highlight-parentheses highlight-symbol ag sass-mode |
163 | fira-code-mode use-package wanderlust # notmuch | 142 | lua-mode fira-code-mode use-package wanderlust # notmuch |
164 | git-gutter emacsScratch | 143 | git-gutter scratch edit-server mediawiki editorconfig |
165 | edit-server mediawiki editorconfig typescript-mode | 144 | typescript-mode markdown-mode nftables-mode rustic |
166 | markdown-mode nftables-mode rustic lsp-mode lsp-ui | 145 | lsp-mode lsp-ui direnv company projectile |
167 | direnv company projectile tomorrow-night-paradise-theme | 146 | tomorrow-night-paradise-theme |
168 | treesit-grammars.with-all-grammars magit-delta scad-mode | 147 | treesit-grammars.with-all-grammars magit-delta scad-mode |
169 | ]; | 148 | ]; |
170 | overrides = self: super: { | 149 | overrides = self: super: { |
171 | tomorrow-night-paradise-theme = super.trivialBuild { | 150 | tomorrow-night-paradise-theme = super.trivialBuild { |
172 | inherit (sources.tomorrow-night-paradise-theme) pname version src; | 151 | inherit (sources.tomorrow-night-paradise-theme) pname version src; |
173 | }; | 152 | }; |
153 | scratch = pkgs.stdenv.mkDerivation { | ||
154 | inherit (sources.emacs-scratch_el) pname version src; | ||
155 | |||
156 | phases = [ "unpackPhase" "installPhase" ]; | ||
157 | |||
158 | installPhase = '' | ||
159 | install -Dt $out/share/emacs/site-lisp scratch.el | ||
160 | ''; | ||
161 | }; | ||
174 | }; | 162 | }; |
175 | }; | 163 | }; |
176 | firefox = { | 164 | firefox = { |
@@ -185,7 +173,12 @@ in { | |||
185 | }; | 173 | }; |
186 | }; | 174 | }; |
187 | 175 | ||
188 | zathura.enable = true; | 176 | zathura = { |
177 | enable = true; | ||
178 | options = { | ||
179 | scroll-page-aware = true; | ||
180 | }; | ||
181 | }; | ||
189 | imv.enable = true; | 182 | imv.enable = true; |
190 | 183 | ||
191 | mpv.config = { | 184 | mpv.config = { |
@@ -194,13 +187,91 @@ in { | |||
194 | gpu-api = "vulkan"; | 187 | gpu-api = "vulkan"; |
195 | }; | 188 | }; |
196 | 189 | ||
197 | zsh.initExtra = '' | 190 | zsh.initContent = let |
198 | source ${./zshrc} | 191 | zshrc = pkgs.resholve.mkDerivation { |
192 | pname = "zshrc"; | ||
193 | version = "0.0.0"; | ||
194 | |||
195 | src = ./zshrc; | ||
196 | |||
197 | dontUnpack = true; | ||
198 | dontConfigure = true; | ||
199 | dontBuild = true; | ||
200 | |||
201 | installPhase = '' | ||
202 | mkdir -p $out/share | ||
203 | install "$src" $out/share/zshrc | ||
204 | ''; | ||
205 | |||
206 | solutions = { | ||
207 | default = { | ||
208 | scripts = [ "share/zshrc" ]; | ||
209 | interpreter = "none"; | ||
210 | inputs = with pkgs; [ | ||
211 | coreutils | ||
212 | rpm | ||
213 | binutils | ||
214 | squashfsTools | ||
215 | unzip | ||
216 | cfg.programs.git.package | ||
217 | magickWrapped | ||
218 | curl | ||
219 | file | ||
220 | gnutar | ||
221 | cpio | ||
222 | magic-wormhole | ||
223 | cfg.programs.zsh.package | ||
224 | fuse | ||
225 | util-linux | ||
226 | findutils | ||
227 | qrencode | ||
228 | tty-clock | ||
229 | cfg.programs.jq.package | ||
230 | eza | ||
231 | less | ||
232 | config.systemd.package | ||
233 | config.programs.ssh.package | ||
234 | gnused | ||
235 | miniserve | ||
236 | ]; | ||
237 | execer = with pkgs; [ | ||
238 | "cannot:${lib.getExe' rpm "rpm2cpio"}" | ||
239 | "cannot:${lib.getExe' squashfsTools "unsquashfs"}" | ||
240 | "cannot:${lib.getExe' unzip "unzip"}" | ||
241 | "cannot:${lib.getExe cfg.programs.git.package}" | ||
242 | "cannot:${lib.getExe cpio}" | ||
243 | "cannot:${lib.getExe' magic-wormhole "wormhole"}" | ||
244 | "cannot:${lib.getExe' fuse "fusermount"}" | ||
245 | "cannot:${lib.getExe less}" | ||
246 | "cannot:${lib.getExe' config.systemd.package "systemctl"}" | ||
247 | "cannot:${lib.getExe config.programs.ssh.package}" | ||
248 | ]; | ||
249 | wrapper = with pkgs; [ | ||
250 | "${lib.getExe' magickWrapped "magick"}:${lib.getExe' imagemagick "magick"}" | ||
251 | ]; | ||
252 | fake = { | ||
253 | builtin = ["print"]; | ||
254 | external = ["sudo" "umount"]; | ||
255 | }; | ||
256 | }; | ||
257 | }; | ||
258 | }; | ||
259 | magickWrapped = pkgs.symlinkJoin { | ||
260 | inherit (pkgs.imagemagick) name; | ||
261 | paths = [ pkgs.imagemagick ]; | ||
262 | |||
263 | buildInputs = with pkgs; [ makeWrapper ]; | ||
264 | postBuild = '' | ||
265 | wrapProgram $out/bin/magick \ | ||
266 | --prefix PATH : ${lib.makeBinPath (with pkgs; [ ghostscript ])} | ||
267 | ''; | ||
268 | }; | ||
269 | in '' | ||
270 | source ${zshrc}/share/zshrc | ||
199 | ''; | 271 | ''; |
200 | zsh.dirHashes = let | 272 | zsh.dirHashes = let |
201 | flakeHashes = mapAttrs' (n: v: nameValuePair (inputNames.${n} or n) (toString v)) flakeInputs; | 273 | flakeHashes = mapAttrs' (n: v: nameValuePair (inputNames.${n} or n) (toString v)) flakeInputs; |
202 | inputNames = { | 274 | inputNames = { |
203 | "nixpkgs" = "nixos"; | ||
204 | }; | 275 | }; |
205 | in flakeHashes // { | 276 | in flakeHashes // { |
206 | u2w = "$HOME/projects/uni2work"; | 277 | u2w = "$HOME/projects/uni2work"; |
@@ -212,6 +283,16 @@ in { | |||
212 | pro = "$HOME/projects/pro"; | 283 | pro = "$HOME/projects/pro"; |
213 | media = "$HOME/media"; | 284 | media = "$HOME/media"; |
214 | }; | 285 | }; |
286 | jq.colors = { | ||
287 | arrays = "1;37"; | ||
288 | "false" = "0;37"; | ||
289 | "null" = "2;37"; | ||
290 | numbers = "0;37"; | ||
291 | objectKeys = "1;34"; | ||
292 | objects = "1;37"; | ||
293 | strings = "0;32"; | ||
294 | "true" = "0;37"; | ||
295 | }; | ||
215 | 296 | ||
216 | obs-studio = { | 297 | obs-studio = { |
217 | enable = true; | 298 | enable = true; |
@@ -221,7 +302,7 @@ in { | |||
221 | gh = { | 302 | gh = { |
222 | enable = true; | 303 | enable = true; |
223 | settings = { | 304 | settings = { |
224 | editor = "${config.home-manager.users.${userName}.programs.emacs.package}/bin/emacsclient"; | 305 | editor = lib.getExe' editor "emacsclient"; |
225 | gitProtocol = "ssh"; | 306 | gitProtocol = "ssh"; |
226 | }; | 307 | }; |
227 | }; | 308 | }; |
@@ -247,16 +328,10 @@ in { | |||
247 | # notify_on_cmd_finish = "invisible 120"; | 328 | # notify_on_cmd_finish = "invisible 120"; |
248 | }; | 329 | }; |
249 | keybindings = { | 330 | keybindings = { |
250 | "kitty_mod+n" = "detach_window"; | 331 | "kitty_mod+n" = "new_os_window_with_cwd"; |
251 | "kitty_mod+m" = "detach_window ask"; | 332 | "kitty_mod+m" = "detach_window ask"; |
252 | }; | 333 | "kitty_mod+enter" = "new_window_with_cwd"; |
253 | }; | 334 | "kitty_mod+t" = "new_tab_with_cwd"; |
254 | wpaperd = { | ||
255 | enable = true; | ||
256 | settings.default = { | ||
257 | path = "~/.wallpapers"; | ||
258 | duration = "8h"; | ||
259 | mode = "center"; | ||
260 | }; | 335 | }; |
261 | }; | 336 | }; |
262 | fuzzel = { | 337 | fuzzel = { |
@@ -269,7 +344,7 @@ in { | |||
269 | font = "Fira Sans"; | 344 | font = "Fira Sans"; |
270 | }; | 345 | }; |
271 | colors = { | 346 | colors = { |
272 | background = "000000aa"; | 347 | background = "000000cc"; |
273 | text = "cdd6f4ff"; | 348 | text = "cdd6f4ff"; |
274 | match = "94e2d5ff"; | 349 | match = "94e2d5ff"; |
275 | selection = "585b70ff"; | 350 | selection = "585b70ff"; |
@@ -282,34 +357,46 @@ in { | |||
282 | }; | 357 | }; |
283 | }; | 358 | }; |
284 | }; | 359 | }; |
360 | pandoc = { | ||
361 | enable = true; | ||
362 | extraAbbreviations = ["i.A." "d.h." "D.h." "gdw."]; | ||
363 | }; | ||
364 | nushell = { | ||
365 | enable = true; | ||
366 | settings.show_banner = false; | ||
367 | }; | ||
368 | fd.enable = true; | ||
285 | }; | 369 | }; |
286 | 370 | ||
287 | services = { | 371 | services = { |
288 | dunst = { | 372 | wpaperd = { |
289 | settings = import ./dunst-settings.nix inputs; | ||
290 | iconTheme = { | ||
291 | package = pkgs.paper-icon-theme; | ||
292 | name = "Paper"; | ||
293 | }; | ||
294 | enable = true; | 373 | enable = true; |
374 | settings.default = { | ||
375 | path = "~/.wallpapers"; | ||
376 | duration = "15m"; | ||
377 | mode = "center"; | ||
378 | }; | ||
295 | }; | 379 | }; |
296 | emacs = { | 380 | emacs = { |
297 | enable = true; | 381 | enable = true; |
298 | socketActivation.enable = true; | 382 | socketActivation.enable = true; |
299 | client = { | 383 | client = { |
300 | enable = true; | 384 | enable = true; |
301 | arguments = mkForce ["--reuse-frame" "--alternate-editor" "\"\""]; | 385 | arguments = mkForce ["--create-frame" "--alternate-editor" (lib.getExe cfg.services.emacs.package)]; |
302 | }; | 386 | }; |
303 | }; | 387 | }; |
304 | gpg-agent = { | 388 | gpg-agent = { |
305 | enable = true; | 389 | enable = true; |
306 | enableSshSupport = true; | 390 | enableSshSupport = true; |
307 | extraConfig = '' | 391 | extraConfig = '' |
308 | pinentry-program ${pkgs.pinentry-gtk2}/bin/pinentry | 392 | pinentry-program ${lib.getExe' pkgs.pinentry-gtk2 "pinentry"} |
309 | grab | 393 | grab |
310 | ''; | 394 | ''; |
311 | }; | 395 | }; |
312 | xembed-sni-proxy.enable = true; | 396 | xembed-sni-proxy = { |
397 | enable = true; | ||
398 | package = pkgs.kdePackages.plasma-workspace; | ||
399 | }; | ||
313 | udiskie = { | 400 | udiskie = { |
314 | enable = true; | 401 | enable = true; |
315 | automount = false; | 402 | automount = false; |
@@ -321,8 +408,11 @@ in { | |||
321 | device_mounted = []; | 408 | device_mounted = []; |
322 | }; | 409 | }; |
323 | device_config = [ | 410 | device_config = [ |
324 | { mount_path = "/run/etc-metadata"; ignore = true; } | 411 | { loop_file = "/nix/store/*-etc-metadata.erofs"; is_mounted = false; ignore = true; } |
412 | { mount_path = "/run/nixos-etc-metadata"; ignore = true; } | ||
413 | { mount_path = "/run/nixos-etc-metadata.*"; ignore = true; } | ||
325 | ]; | 414 | ]; |
415 | icon_names.media = ["drive-removable-media-symbolic"]; | ||
326 | }; | 416 | }; |
327 | }; | 417 | }; |
328 | network-manager-applet.enable = true; | 418 | network-manager-applet.enable = true; |
@@ -339,7 +429,7 @@ in { | |||
339 | batch = "true"; | 429 | batch = "true"; |
340 | log = "false"; | 430 | log = "false"; |
341 | repeat = "watch"; | 431 | repeat = "watch"; |
342 | sshcmd = "${pkgs.openssh}/bin/ssh"; | 432 | sshcmd = lib.getExe' pkgs.openssh "ssh"; |
343 | ui = "text"; | 433 | ui = "text"; |
344 | }; | 434 | }; |
345 | }; | 435 | }; |
@@ -359,31 +449,17 @@ in { | |||
359 | enable = true; | 449 | enable = true; |
360 | events = [ | 450 | events = [ |
361 | { event = "before-sleep"; command = lockCommand; } | 451 | { event = "before-sleep"; command = lockCommand; } |
362 | # { event = "after-resume"; command = "${cfg.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on"; } | ||
363 | { event = "lock"; command = lockCommand; } | 452 | { event = "lock"; command = lockCommand; } |
364 | ]; | 453 | ]; |
365 | timeouts = [ | 454 | timeouts = [ |
366 | # { timeout = 300; | 455 | { timeout = 600; command = lockCommand; } |
367 | # command = "${cfg.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off"; | ||
368 | # } | ||
369 | { timeout = 330; command = lockCommand; } | ||
370 | ]; | 456 | ]; |
371 | extraArgs = [ | 457 | extraArgs = [ |
458 | "-w" | ||
372 | "idlehint" "30" | 459 | "idlehint" "30" |
373 | ]; | 460 | ]; |
374 | }; | 461 | }; |
375 | poweralertd.enable = true; | 462 | poweralertd.enable = true; |
376 | avizo = { | ||
377 | enable = true; | ||
378 | settings.default = { | ||
379 | time = "1.0"; | ||
380 | background = "rgba(0, 0, 0, 0.8)"; | ||
381 | border-color = "rgba(0, 0, 0, 1)"; | ||
382 | bar-fg-color = "rgba(160, 160, 160, 1)"; | ||
383 | bar-bg-color = "rgba(32, 32, 32, 0.96)"; | ||
384 | # y-offset = "0.25"; | ||
385 | }; | ||
386 | }; | ||
387 | }; | 463 | }; |
388 | 464 | ||
389 | home.pointerCursor = { | 465 | home.pointerCursor = { |
@@ -415,6 +491,13 @@ in { | |||
415 | }; | 491 | }; |
416 | }; | 492 | }; |
417 | 493 | ||
494 | qt.kde.settings = { | ||
495 | kwalletrc = { | ||
496 | KSecretD.Enabled = false; | ||
497 | Wallet."Default Wallet" = "store"; | ||
498 | }; | ||
499 | }; | ||
500 | |||
418 | xsession.preferStatusNotifierItems = true; | 501 | xsession.preferStatusNotifierItems = true; |
419 | 502 | ||
420 | xresources.properties = import ./xresources.nix; | 503 | xresources.properties = import ./xresources.nix; |
@@ -423,18 +506,19 @@ in { | |||
423 | packages = with pkgs; [ | 506 | packages = with pkgs; [ |
424 | fira fira-code pwvucontrol wrappedKeepassxc wl-clipboard-rs | 507 | fira fira-code pwvucontrol wrappedKeepassxc wl-clipboard-rs |
425 | mumble pulseaudio-ctl pamixer libnotify screen-message | 508 | mumble pulseaudio-ctl pamixer libnotify screen-message |
426 | wrappedYTMDesktop libsForQt5.qt5ct playerctl evince | 509 | wrappedYTMDesktop libsForQt5.qt5ct playerctl evince papers |
427 | thunderbird zoom-us steam steam-run wireshark virt-manager | 510 | thunderbird zoom-us xdg-desktop-portal steam steam-run |
428 | rclone cached-nix-shell worktime fira-code-symbols | 511 | wireshark virt-manager rclone cached-nix-shell worktime |
429 | libreoffice xournalpp google-chrome nixos-shell virt-viewer | 512 | fira-code-symbols libreoffice xournalpp google-chrome |
430 | freerdp gnome-icon-theme paper-icon-theme sshpassSecret | 513 | nixos-shell virt-viewer freerdp gnome-icon-theme |
431 | weechat element-desktop matrix-synapse-tools.synadm | 514 | paper-icon-theme sshpassSecret weechat element-desktop |
432 | flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs | 515 | sieve-connect gimp3 inkscape udiskie glab nitrokey-app |
433 | sieve-connect gimp inkscape udiskie glab nitrokey-app | ||
434 | pynitrokey gtklock wlrctl remmina openscad spice-record | 516 | pynitrokey gtklock wlrctl remmina openscad spice-record |
435 | libguestfs-with-appliance nerd-fonts.fira-mono | 517 | libguestfs-with-appliance nerd-fonts.fira-mono |
436 | nerd-fonts.symbols-only nerd-fonts.fira-code powerline-fonts | 518 | nerd-fonts.symbols-only nerd-fonts.fira-code powerline-fonts |
437 | ]; | 519 | swtpm (hunspellWithDicts (with hunspellDicts; [en_GB-large de_DE])) |
520 | libation libqalculate | ||
521 | ] ++ mapAttrsToList (_name: pkg: pkgs.callPackage pkg {}) (customUtils.nixImport { dir = ./utils; }); | ||
438 | 522 | ||
439 | file = { | 523 | file = { |
440 | ".backup-munin".source = ./backup-patterns; | 524 | ".backup-munin".source = ./backup-patterns; |
@@ -454,12 +538,9 @@ in { | |||
454 | QT_QPA_PLATFORMTHEME = "qt5ct"; | 538 | QT_QPA_PLATFORMTHEME = "qt5ct"; |
455 | LIBVIRT_DEFAULT_URI = "qemu:///system"; | 539 | LIBVIRT_DEFAULT_URI = "qemu:///system"; |
456 | STACK_XDG = 1; | 540 | STACK_XDG = 1; |
457 | EDITOR = pkgs.writeShellScript "editor" '' | 541 | EDITOR = lib.getExe' editor "emacsclient"; |
458 | args=("--reuse-frame" "--alternate-editor" "") | 542 | RCLONE_PASSWORD_COMMAND = "${lib.getExe' pkgs.libsecret "secret-tool"} lookup service rclone"; |
459 | args+=("$@") | 543 | SYSTEMD_TINT_BACKGROUND = "false"; |
460 | exec -a emacsclient ${cfg.services.emacs.package}/bin/emacsclient "''${args[@]}" | ||
461 | ''; | ||
462 | RCLONE_PASSWORD_COMMAND = "${pkgs.libsecret}/bin/secret-tool lookup service rclone"; | ||
463 | }; | 544 | }; |
464 | 545 | ||
465 | extraProfileCommands = '' | 546 | extraProfileCommands = '' |
@@ -468,18 +549,11 @@ in { | |||
468 | }; | 549 | }; |
469 | 550 | ||
470 | xdg.configFile = { | 551 | xdg.configFile = { |
471 | "dunst/dunstrc.d" = { | ||
472 | source = ./dunstrc.d; | ||
473 | recursive = true; | ||
474 | onChange = '' | ||
475 | ${pkgs.systemd}/bin/systemctl --user try-restart dunst | ||
476 | ''; | ||
477 | }; | ||
478 | "wireplumber" = { | 552 | "wireplumber" = { |
479 | source = ./wireplumber; | 553 | source = ./wireplumber; |
480 | recursive = true; | 554 | recursive = true; |
481 | onChange = '' | 555 | onChange = '' |
482 | ${pkgs.systemd}/bin/systemctl --user try-restart wireplumber | 556 | ${lib.getExe' config.systemd.package "systemctl"} --user try-restart wireplumber |
483 | ''; | 557 | ''; |
484 | }; | 558 | }; |
485 | "stack/config.yaml" = { | 559 | "stack/config.yaml" = { |
@@ -503,37 +577,36 @@ in { | |||
503 | General = { | 577 | General = { |
504 | dot_as_separator = 0; | 578 | dot_as_separator = 0; |
505 | }; | 579 | }; |
580 | Mode = { | ||
581 | calculate_as_you_type = 1; | ||
582 | }; | ||
506 | }; | 583 | }; |
507 | }; | 584 | }; |
508 | "emacs/init.el".source = ./emacs.el; | 585 | "emacs/init.el".source = pkgs.substitute { |
586 | src = ./emacs.el; | ||
587 | substitutions = [ | ||
588 | "--subst-var-by" "ksshaskpass" (lib.getExe pkgs.kdePackages.ksshaskpass) | ||
589 | ]; | ||
590 | }; | ||
591 | "systemd/user/xdg-desktop-portal.service.d/after-graphical-session.conf".text = '' | ||
592 | [Unit] | ||
593 | After=graphical-session.target | ||
594 | ''; | ||
595 | "systemd/user/home-manager.service.d/before-graphical-session.conf".text = '' | ||
596 | [Unit] | ||
597 | Before=graphical-session-pre.target | ||
598 | ''; | ||
599 | "pdfpc/pdfpcrc".text = '' | ||
600 | mouse 8 prev | ||
601 | mouse 9 next | ||
602 | ''; | ||
509 | }; | 603 | }; |
510 | 604 | ||
511 | xdg.dataFile = { | 605 | xdg.dataFile = { |
512 | "pandoc/abbreviations" = { | ||
513 | source = pkgs.runCommand "pandoc-abbreviations" { | ||
514 | buildInputs = [ pkgs.pandoc pkgs.coreutils ]; | ||
515 | } (let | ||
516 | germanAbbrevs = pkgs.fetchFromGitHub { | ||
517 | owner = "jfilter"; | ||
518 | repo = "german-abbreviations"; | ||
519 | rev = "8eb9dae93b6f05d7c53374cd217ab2dc89558e0c"; | ||
520 | sha256 = "SaD3tSqzen6Y3SPICe6/9vhe4iMHlArZ3kFQaEk7Hps="; | ||
521 | }; | ||
522 | in '' | ||
523 | cat \ | ||
524 | <(pandoc --print-default-data-file=abbreviations) \ | ||
525 | <(grep -E '^[^ ]+\.$' ${germanAbbrevs}/german_abbreviations.txt) \ | ||
526 | ${pkgs.writeText "abbrevs.txt" '' | ||
527 | i.A. | ||
528 | d.h. | ||
529 | D.h. | ||
530 | gdw. | ||
531 | ''} \ | ||
532 | | sort | uniq >$out | ||
533 | ''); | ||
534 | }; | ||
535 | "dbus-1/services/org.keepassxc.KeePassXC.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.keepassxc.KeePassXC.service"; | 606 | "dbus-1/services/org.keepassxc.KeePassXC.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.keepassxc.KeePassXC.service"; |
536 | "dbus-1/services/org.freedesktop.secrets.service.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.freedesktop.secrets.service.service"; | 607 | "dbus-1/services/org.freedesktop.secrets.service.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.freedesktop.secrets.service.service"; |
608 | "dbus-1/services/org.kde.kwalletd6.service".source = "${pkgs.kdePackages.kwallet}/share/dbus-1/services/org.kde.kwalletd6.service"; | ||
609 | "dbus-1/services/org.kde.kwalletd5.service".source = "${pkgs.kdePackages.kwallet}/share/dbus-1/services/org.kde.kwalletd5.service"; | ||
537 | "emoji-data/list.txt".source = pkgs.stdenv.mkDerivation { | 610 | "emoji-data/list.txt".source = pkgs.stdenv.mkDerivation { |
538 | inherit (sources.emoji-data) pname src; | 611 | inherit (sources.emoji-data) pname src; |
539 | version = lib.removePrefix "v" sources.emoji-data.version; | 612 | version = lib.removePrefix "v" sources.emoji-data.version; |
@@ -619,19 +692,68 @@ in { | |||
619 | name = "Rainbow"; | 692 | name = "Rainbow"; |
620 | exec = toString (pkgs.writeShellScript "rainbow" '' | 693 | exec = toString (pkgs.writeShellScript "rainbow" '' |
621 | exec -- \ | 694 | exec -- \ |
622 | ${config.systemd.package}/bin/systemd-run --wait --user --slice-inherit \ | 695 | ${lib.getExe' config.systemd.package "systemd-run"} --wait --user --slice-inherit \ |
623 | --property 'CPUAccounting=yes' --property 'CPUQuotaPeriodSec=50ms' \ | 696 | --property 'CPUAccounting=yes' --property 'CPUQuotaPeriodSec=50ms' \ |
624 | --property 'Environment=DSCP=46' \ | 697 | -E DSCP=46 -E NIXOS_OZONE_WL \ |
625 | -- ${pkgs.dscp}/bin/dscp ${pkgs.google-chrome}/bin/google-chrome-stable \ | 698 | -- ${lib.getExe pkgs.dscp} ${lib.getExe' pkgs.google-chrome "google-chrome-stable"} \ |
626 | --force-device-scale-factor=1.5 \ | ||
627 | --class=Rainbow \ | 699 | --class=Rainbow \ |
628 | --kiosk "https://web.openrainbow.com" \ | 700 | --app="https://web.openrainbow.com" \ |
629 | --user-data-dir=''${HOME}/.config/google-chrome-rainbow | 701 | --user-data-dir=''${HOME}/.config/google-chrome-rainbow |
630 | ''); | 702 | ''); |
631 | icon = pkgs.fetchurl { | 703 | icon = pkgs.fetchurl { |
632 | url = "https://web.openrainbow.com/rb/2.139.17/assets/skins/rainbow/images/homepage/logo__rainbow.svg"; | 704 | url = "https://web.openrainbow.com/rb/2.139.17/assets/skins/rainbow/images/homepage/logo__rainbow.svg"; |
633 | hash = "sha256-5fmo8rDqVDpzkGaPjk4Y+SsSZpAsY7VUQSFW6WdHwuU="; | 705 | hash = "sha256-5fmo8rDqVDpzkGaPjk4Y+SsSZpAsY7VUQSFW6WdHwuU="; |
634 | }; | 706 | }; |
707 | settings = { | ||
708 | StartupWMClass = "Rainbow"; | ||
709 | }; | ||
710 | }; | ||
711 | kimai = { | ||
712 | name = "Kimai"; | ||
713 | exec = toString (pkgs.writeShellScript "kimai" '' | ||
714 | exec -- \ | ||
715 | ${lib.getExe' pkgs.google-chrome "google-chrome-stable"} \ | ||
716 | --class=Kimai \ | ||
717 | --app="https://kimai.yggdrasil.li" \ | ||
718 | --user-data-dir=''${HOME}/.config/google-chrome-kimai | ||
719 | ''); | ||
720 | icon = pkgs.fetchurl { | ||
721 | url = "https://www.kimai.org/images/kimai_logo.png"; | ||
722 | hash = "sha256-lnlOttzR2SwXA70R+egJUkeKr4U5V0avqTk8uX4bqfs="; | ||
723 | }; | ||
724 | settings = { | ||
725 | StartupWMClass = "Kimai"; | ||
726 | StartupNotify = "true"; | ||
727 | }; | ||
728 | }; | ||
729 | audiobookshelf = { | ||
730 | name = "Audiobookshelf"; | ||
731 | exec = toString (pkgs.writeShellScript "audiobookshelf" '' | ||
732 | exec -- \ | ||
733 | ${lib.getExe' pkgs.google-chrome "google-chrome-stable"} \ | ||
734 | --class=Audiobookshelf \ | ||
735 | --app="https://audiobookshelf.yggdrasil.li" \ | ||
736 | --user-data-dir=''${HOME}/.config/google-chrome-audiobookshelf | ||
737 | ''); | ||
738 | icon = pkgs.fetchurl { | ||
739 | url = "https://www.audiobookshelf.org/Logo.png"; | ||
740 | hash = "sha256-JGPk+WNT1C4DC4lSMb0K0YmAMT5LvmSOeO0QRzkc7Lk="; | ||
741 | }; | ||
742 | settings = { | ||
743 | StartupWMClass = "Audiobookshelf"; | ||
744 | StartupNotify = "true"; | ||
745 | }; | ||
746 | }; | ||
747 | thunderbird-lmu = { | ||
748 | name = "Thunderbird (LMU)"; | ||
749 | exec = "thunderbird --name thunderbird -P lmu %U"; | ||
750 | icon = "thunderbird"; | ||
751 | genericName = "Email Client"; | ||
752 | categories = [ "Network" "Chat" "Email" "Feed" "GTK" "News" ]; | ||
753 | settings = { | ||
754 | StartupWMClass = "thunderbird"; | ||
755 | StartupNotify = "true"; | ||
756 | }; | ||
635 | }; | 757 | }; |
636 | }; | 758 | }; |
637 | 759 | ||