diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-03-16 17:15:39 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-03-16 17:15:39 +0100 |
commit | 804533cde06189bb2109c063092d59b2d53ee4db (patch) | |
tree | 392f4158fa2e0b934a1cfc6bb944ce5409f653ca /accounts/gkleen@sif | |
parent | 31ab1c84a4da06d1bf029c462fd9adeadb601c8c (diff) | |
download | nixos-804533cde06189bb2109c063092d59b2d53ee4db.tar nixos-804533cde06189bb2109c063092d59b2d53ee4db.tar.gz nixos-804533cde06189bb2109c063092d59b2d53ee4db.tar.bz2 nixos-804533cde06189bb2109c063092d59b2d53ee4db.tar.xz nixos-804533cde06189bb2109c063092d59b2d53ee4db.zip |
...
Diffstat (limited to 'accounts/gkleen@sif')
-rw-r--r-- | accounts/gkleen@sif/default.nix | 107 | ||||
-rw-r--r-- | accounts/gkleen@sif/ssh-hosts.nix | 6 | ||||
-rw-r--r-- | accounts/gkleen@sif/systemd.nix | 38 | ||||
-rw-r--r-- | accounts/gkleen@sif/zshrc | 17 |
4 files changed, 63 insertions, 105 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 6f720bbf..1254b6db 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,7 +42,7 @@ 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 | }) |
@@ -87,8 +56,6 @@ in { | |||
87 | ]; | 56 | ]; |
88 | 57 | ||
89 | config = { | 58 | config = { |
90 | services.displayManager.defaultSession = "Hyprland"; # "none+xmonad"; | ||
91 | |||
92 | home-manager.users.${userName} = { | 59 | home-manager.users.${userName} = { |
93 | imports = [ | 60 | imports = [ |
94 | ./libvirt | 61 | ./libvirt |
@@ -137,8 +104,8 @@ in { | |||
137 | ''} | 104 | ''} |
138 | 105 | ||
139 | Match host *.mathinst.loc,*.math.lmu.de !host ssh.math.lmu.de !exec "nc -z -w 1 %h %p &>/dev/null" | 106 | 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 | 107 | ProxyCommand ${lib.getExe pkgs.socat} - SOCKS4A:127.0.0.1:%h:%p,socksport=8118 |
141 | ProxyJump ssh.math.lmu.de | 108 | # ProxyJump ssh.math.lmu.de |
142 | 109 | ||
143 | Match host *.cipmath.loc !host cip04.cipmath.loc,mgmt-cls01.cipmath.loc !exec "nc -z -w 1 %h %p &>/dev/null" | 110 | Match host *.cipmath.loc !host cip04.cipmath.loc,mgmt-cls01.cipmath.loc !exec "nc -z -w 1 %h %p &>/dev/null" |
144 | ProxyJump cip04 | 111 | ProxyJump cip04 |
@@ -159,18 +126,27 @@ in { | |||
159 | extraPackages = epkgs: with epkgs; [ | 126 | extraPackages = epkgs: with epkgs; [ |
160 | evil evil-dvorak undo-tree magit haskell-tng-mode nix-mode | 127 | evil evil-dvorak undo-tree magit haskell-tng-mode nix-mode |
161 | yaml-mode json-mode shakespeare-mode smart-mode-line | 128 | yaml-mode json-mode shakespeare-mode smart-mode-line |
162 | highlight-parentheses highlight-symbol ag sass-mode lua-mode | 129 | highlight-parentheses highlight-symbol ag sass-mode |
163 | fira-code-mode use-package wanderlust # notmuch | 130 | lua-mode fira-code-mode use-package wanderlust # notmuch |
164 | git-gutter emacsScratch | 131 | git-gutter scratch edit-server mediawiki editorconfig |
165 | edit-server mediawiki editorconfig typescript-mode | 132 | typescript-mode markdown-mode nftables-mode rustic |
166 | markdown-mode nftables-mode rustic lsp-mode lsp-ui | 133 | lsp-mode lsp-ui direnv company projectile |
167 | direnv company projectile tomorrow-night-paradise-theme | 134 | tomorrow-night-paradise-theme |
168 | treesit-grammars.with-all-grammars magit-delta scad-mode | 135 | treesit-grammars.with-all-grammars magit-delta scad-mode |
169 | ]; | 136 | ]; |
170 | overrides = self: super: { | 137 | overrides = self: super: { |
171 | tomorrow-night-paradise-theme = super.trivialBuild { | 138 | tomorrow-night-paradise-theme = super.trivialBuild { |
172 | inherit (sources.tomorrow-night-paradise-theme) pname version src; | 139 | inherit (sources.tomorrow-night-paradise-theme) pname version src; |
173 | }; | 140 | }; |
141 | scratch = pkgs.stdenv.mkDerivation { | ||
142 | inherit (sources.emacs-scratch_el) pname version src; | ||
143 | |||
144 | phases = [ "unpackPhase" "installPhase" ]; | ||
145 | |||
146 | installPhase = '' | ||
147 | install -Dt $out/share/emacs/site-lisp scratch.el | ||
148 | ''; | ||
149 | }; | ||
174 | }; | 150 | }; |
175 | }; | 151 | }; |
176 | firefox = { | 152 | firefox = { |
@@ -226,7 +202,7 @@ in { | |||
226 | gh = { | 202 | gh = { |
227 | enable = true; | 203 | enable = true; |
228 | settings = { | 204 | settings = { |
229 | editor = "${config.home-manager.users.${userName}.programs.emacs.package}/bin/emacsclient"; | 205 | editor = lib.getExe' config.home-manager.users.${userName}.programs.emacs.package "emacsclient"; |
230 | gitProtocol = "ssh"; | 206 | gitProtocol = "ssh"; |
231 | }; | 207 | }; |
232 | }; | 208 | }; |
@@ -287,6 +263,10 @@ in { | |||
287 | }; | 263 | }; |
288 | }; | 264 | }; |
289 | }; | 265 | }; |
266 | pandoc = { | ||
267 | enable = true; | ||
268 | extraAbbreviations = ["i.A." "d.h." "D.h." "gdw."]; | ||
269 | }; | ||
290 | }; | 270 | }; |
291 | 271 | ||
292 | services = { | 272 | services = { |
@@ -302,7 +282,7 @@ in { | |||
302 | enable = true; | 282 | enable = true; |
303 | enableSshSupport = true; | 283 | enableSshSupport = true; |
304 | extraConfig = '' | 284 | extraConfig = '' |
305 | pinentry-program ${pkgs.pinentry-gtk2}/bin/pinentry | 285 | pinentry-program ${lib.getExe' pkgs.pinentry-gtk2 "pinentry"} |
306 | grab | 286 | grab |
307 | ''; | 287 | ''; |
308 | }; | 288 | }; |
@@ -342,7 +322,7 @@ in { | |||
342 | batch = "true"; | 322 | batch = "true"; |
343 | log = "false"; | 323 | log = "false"; |
344 | repeat = "watch"; | 324 | repeat = "watch"; |
345 | sshcmd = "${pkgs.openssh}/bin/ssh"; | 325 | sshcmd = lib.getExe' pkgs.openssh "ssh"; |
346 | ui = "text"; | 326 | ui = "text"; |
347 | }; | 327 | }; |
348 | }; | 328 | }; |
@@ -418,13 +398,13 @@ in { | |||
418 | fira-code-symbols libreoffice xournalpp google-chrome | 398 | fira-code-symbols libreoffice xournalpp google-chrome |
419 | nixos-shell virt-viewer freerdp gnome-icon-theme | 399 | nixos-shell virt-viewer freerdp gnome-icon-theme |
420 | paper-icon-theme sshpassSecret weechat element-desktop | 400 | paper-icon-theme sshpassSecret weechat element-desktop |
421 | matrix-synapse-tools.synadm | ||
422 | flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs | 401 | flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs |
423 | sieve-connect gimp inkscape udiskie glab nitrokey-app | 402 | sieve-connect gimp inkscape udiskie glab nitrokey-app |
424 | pynitrokey gtklock wlrctl remmina openscad spice-record | 403 | pynitrokey gtklock wlrctl remmina openscad spice-record |
425 | libguestfs-with-appliance nerd-fonts.fira-mono | 404 | libguestfs-with-appliance nerd-fonts.fira-mono |
426 | nerd-fonts.symbols-only nerd-fonts.fira-code powerline-fonts | 405 | nerd-fonts.symbols-only nerd-fonts.fira-code powerline-fonts |
427 | swtpm (hunspellWithDicts (with hunspellDicts; [en_GB-large de_DE])) | 406 | swtpm (hunspellWithDicts (with hunspellDicts; [en_GB-large de_DE])) |
407 | # synadm | ||
428 | ]; | 408 | ]; |
429 | 409 | ||
430 | file = { | 410 | file = { |
@@ -448,9 +428,9 @@ in { | |||
448 | EDITOR = pkgs.writeShellScript "editor" '' | 428 | EDITOR = pkgs.writeShellScript "editor" '' |
449 | args=("--reuse-frame" "--alternate-editor" "") | 429 | args=("--reuse-frame" "--alternate-editor" "") |
450 | args+=("$@") | 430 | args+=("$@") |
451 | exec -a emacsclient ${cfg.services.emacs.package}/bin/emacsclient "''${args[@]}" | 431 | exec -a emacsclient ${lib.getExe' cfg.services.emacs.package "emacsclient"} "''${args[@]}" |
452 | ''; | 432 | ''; |
453 | RCLONE_PASSWORD_COMMAND = "${pkgs.libsecret}/bin/secret-tool lookup service rclone"; | 433 | RCLONE_PASSWORD_COMMAND = "${lib.getExe' pkgs.libsecret "secret-tool"} lookup service rclone"; |
454 | }; | 434 | }; |
455 | 435 | ||
456 | extraProfileCommands = '' | 436 | extraProfileCommands = '' |
@@ -463,7 +443,7 @@ in { | |||
463 | source = ./wireplumber; | 443 | source = ./wireplumber; |
464 | recursive = true; | 444 | recursive = true; |
465 | onChange = '' | 445 | onChange = '' |
466 | ${pkgs.systemd}/bin/systemctl --user try-restart wireplumber | 446 | ${lib.getExe' config.systemd.package "systemctl"} --user try-restart wireplumber |
467 | ''; | 447 | ''; |
468 | }; | 448 | }; |
469 | "stack/config.yaml" = { | 449 | "stack/config.yaml" = { |
@@ -505,29 +485,6 @@ in { | |||
505 | }; | 485 | }; |
506 | 486 | ||
507 | xdg.dataFile = { | 487 | xdg.dataFile = { |
508 | "pandoc/abbreviations" = { | ||
509 | source = pkgs.runCommand "pandoc-abbreviations" { | ||
510 | buildInputs = [ pkgs.pandoc pkgs.coreutils ]; | ||
511 | } (let | ||
512 | germanAbbrevs = pkgs.fetchFromGitHub { | ||
513 | owner = "jfilter"; | ||
514 | repo = "german-abbreviations"; | ||
515 | rev = "8eb9dae93b6f05d7c53374cd217ab2dc89558e0c"; | ||
516 | sha256 = "SaD3tSqzen6Y3SPICe6/9vhe4iMHlArZ3kFQaEk7Hps="; | ||
517 | }; | ||
518 | in '' | ||
519 | cat \ | ||
520 | <(pandoc --print-default-data-file=abbreviations) \ | ||
521 | <(grep -E '^[^ ]+\.$' ${germanAbbrevs}/german_abbreviations.txt) \ | ||
522 | ${pkgs.writeText "abbrevs.txt" '' | ||
523 | i.A. | ||
524 | d.h. | ||
525 | D.h. | ||
526 | gdw. | ||
527 | ''} \ | ||
528 | | sort | uniq >$out | ||
529 | ''); | ||
530 | }; | ||
531 | "dbus-1/services/org.keepassxc.KeePassXC.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.keepassxc.KeePassXC.service"; | 488 | "dbus-1/services/org.keepassxc.KeePassXC.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.keepassxc.KeePassXC.service"; |
532 | "dbus-1/services/org.freedesktop.secrets.service.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.freedesktop.secrets.service.service"; | 489 | "dbus-1/services/org.freedesktop.secrets.service.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.freedesktop.secrets.service.service"; |
533 | "emoji-data/list.txt".source = pkgs.stdenv.mkDerivation { | 490 | "emoji-data/list.txt".source = pkgs.stdenv.mkDerivation { |
@@ -615,10 +572,10 @@ in { | |||
615 | name = "Rainbow"; | 572 | name = "Rainbow"; |
616 | exec = toString (pkgs.writeShellScript "rainbow" '' | 573 | exec = toString (pkgs.writeShellScript "rainbow" '' |
617 | exec -- \ | 574 | exec -- \ |
618 | ${config.systemd.package}/bin/systemd-run --wait --user --slice-inherit \ | 575 | ${lib.getExe' config.systemd.package "systemd-run"} --wait --user --slice-inherit \ |
619 | --property 'CPUAccounting=yes' --property 'CPUQuotaPeriodSec=50ms' \ | 576 | --property 'CPUAccounting=yes' --property 'CPUQuotaPeriodSec=50ms' \ |
620 | --property 'Environment=DSCP=46' \ | 577 | --property 'Environment=DSCP=46' \ |
621 | -- ${pkgs.dscp}/bin/dscp ${pkgs.google-chrome}/bin/google-chrome-stable \ | 578 | -- ${lib.getExe pkgs.dscp} ${lib.getExe' pkgs.google-chrome "google-chrome-stable"} \ |
622 | --class=Rainbow \ | 579 | --class=Rainbow \ |
623 | --kiosk "https://web.openrainbow.com" \ | 580 | --kiosk "https://web.openrainbow.com" \ |
624 | --user-data-dir=''${HOME}/.config/google-chrome-rainbow | 581 | --user-data-dir=''${HOME}/.config/google-chrome-rainbow |
diff --git a/accounts/gkleen@sif/ssh-hosts.nix b/accounts/gkleen@sif/ssh-hosts.nix index ac930614..4ca9e052 100644 --- a/accounts/gkleen@sif/ssh-hosts.nix +++ b/accounts/gkleen@sif/ssh-hosts.nix | |||
@@ -306,8 +306,8 @@ | |||
306 | "mathw0h" = | 306 | "mathw0h" = |
307 | { hostname = "mathw0h.mathinst.loc"; | 307 | { hostname = "mathw0h.mathinst.loc"; |
308 | }; | 308 | }; |
309 | "proxy.mathw0g" = | 309 | "proxy.ssh.math.lmu.de" = |
310 | { hostname = "mathw0g.mathinst.loc"; | 310 | { hostname = "ssh.math.lmu.de"; |
311 | extraOptions = { | 311 | extraOptions = { |
312 | ControlPath = "none"; | 312 | ControlPath = "none"; |
313 | ExitOnForwardFailure = "yes"; | 313 | ExitOnForwardFailure = "yes"; |
@@ -317,7 +317,7 @@ | |||
317 | }; | 317 | }; |
318 | "proxy.mathw0h" = | 318 | "proxy.mathw0h" = |
319 | { hostname = "mathw0h.mathinst.loc"; | 319 | { hostname = "mathw0h.mathinst.loc"; |
320 | proxyJump = "proxy.mathw0g"; | 320 | # proxyJump = "proxy.ssh.math.lmu.de"; |
321 | extraOptions = { | 321 | extraOptions = { |
322 | ControlPath = "none"; | 322 | ControlPath = "none"; |
323 | ExitOnForwardFailure = "yes"; | 323 | ExitOnForwardFailure = "yes"; |
diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix index a89b46c2..14669a1e 100644 --- a/accounts/gkleen@sif/systemd.nix +++ b/accounts/gkleen@sif/systemd.nix | |||
@@ -6,7 +6,7 @@ let | |||
6 | cfg = config.home-manager.users.${userName}; | 6 | cfg = config.home-manager.users.${userName}; |
7 | 7 | ||
8 | autossh-socks-script = pkgs.writeScript "autossh" '' | 8 | autossh-socks-script = pkgs.writeScript "autossh" '' |
9 | #!${pkgs.zsh}/bin/zsh -xe | 9 | #!${lib.getExe pkgs.zsh} -xe |
10 | 10 | ||
11 | host="''${1%:*}" | 11 | host="''${1%:*}" |
12 | port="''${1#*:}" | 12 | port="''${1#*:}" |
@@ -15,31 +15,29 @@ let | |||
15 | cmd=() | 15 | cmd=() |
16 | 16 | ||
17 | if [[ -n "''${SSHPASS_SECRET}" ]]; then | 17 | if [[ -n "''${SSHPASS_SECRET}" ]]; then |
18 | cmd+=(${pkgs.sshpassSecret}/bin/sshpass-secret) | 18 | cmd+=(${lib.getExe' pkgs.sshpassSecret "sshpass-secret"}) |
19 | cmd+=("''${(@s/:/)SSHPASS_SECRET}") | 19 | cmd+=("''${(@s/:/)SSHPASS_SECRET}") |
20 | cmd+=(--) | 20 | cmd+=(--) |
21 | fi | 21 | fi |
22 | 22 | ||
23 | cmd+=(${pkgs.openssh}/bin/ssh -vN -D localhost:''${port} "''${host}") | 23 | cmd+=(${lib.getExe' pkgs.openssh "ssh"} -vN -D localhost:''${port} "''${host}") |
24 | 24 | ||
25 | ( exec -a "''${cmd[1]}" -- ''${cmd} ) & | 25 | ( exec -a "''${cmd[1]}" -- ''${cmd} ) & |
26 | pid=$! | 26 | pid=$! |
27 | 27 | ||
28 | newpid="" | 28 | newpid="" |
29 | i=200 | 29 | i=200 |
30 | while ! newpid=$(${pkgs.lsof}/bin/lsof -Pi @localhost:"''${port}" -sTCP:LISTEN -t); do | 30 | while ! newpid=$(${lib.getExe pkgs.lsof} -Pi @localhost:"''${port}" -sTCP:LISTEN -t); do |
31 | if ! kill -0 "''${pid}"; then | 31 | if ! kill -0 "''${pid}"; then |
32 | wait "''${pid}" | 32 | wait "''${pid}" |
33 | exit $? | 33 | exit $? |
34 | fi | 34 | fi |
35 | [[ "''${i}" -gt 0 ]] || exit 1 | 35 | [[ "''${i}" -gt 0 ]] || exit 1 |
36 | i=$((''${i} - 1)) | 36 | i=$((''${i} - 1)) |
37 | ${pkgs.coreutils}/bin/sleep 0.1 | 37 | ${lib.getExe' pkgs.coreutils "sleep"} 0.1 |
38 | done | 38 | done |
39 | 39 | ||
40 | ${config.systemd.package}/bin/systemd-notify --ready | 40 | ${lib.getExe' config.systemd.package "systemd-notify"} --pid=''${newpid} --ready |
41 | |||
42 | wait "''${pid}" "''${newpid}" | ||
43 | ''; | 41 | ''; |
44 | in { | 42 | in { |
45 | tmpfiles.rules = [ | 43 | tmpfiles.rules = [ |
@@ -146,7 +144,7 @@ in { | |||
146 | Service.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; | 144 | Service.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; |
147 | Install.WantedBy = [ "default.target" ]; | 145 | Install.WantedBy = [ "default.target" ]; |
148 | }; | 146 | }; |
149 | "autossh-socks@proxy.mathw0h:8119" = { | 147 | "autossh-socks@proxy.ssh.math.lmu.de:8119" = { |
150 | Service = { | 148 | Service = { |
151 | Type = "notify"; | 149 | Type = "notify"; |
152 | NotifyAccess = "all"; | 150 | NotifyAccess = "all"; |
@@ -154,7 +152,7 @@ in { | |||
154 | Restart = "always"; | 152 | Restart = "always"; |
155 | RestartSec = "23s"; | 153 | RestartSec = "23s"; |
156 | ExecStart = "${autossh-socks-script} \"%I\""; | 154 | ExecStart = "${autossh-socks-script} \"%I\""; |
157 | Environment = [ "SSHPASS_SECRET=gkleen@mathw0g.math.lmu.de" ]; | 155 | Environment = [ "SSHPASS_SECRET=gkleen@ssh.math.lmu.de" ]; |
158 | }; | 156 | }; |
159 | Unit = { | 157 | Unit = { |
160 | StopWhenUnneeded = true; | 158 | StopWhenUnneeded = true; |
@@ -175,6 +173,22 @@ in { | |||
175 | StopWhenUnneeded = true; | 173 | StopWhenUnneeded = true; |
176 | }; | 174 | }; |
177 | }; | 175 | }; |
176 | "autossh-socks@proxy.mathw0h:8123" = { | ||
177 | Service = { | ||
178 | Type = "notify"; | ||
179 | NotifyAccess = "all"; | ||
180 | WorkingDirectory = "~"; | ||
181 | Restart = "always"; | ||
182 | RestartSec = "23s"; | ||
183 | ExecStart = "${autossh-socks-script} \"%I\""; | ||
184 | Environment = [ "SSHPASS_SECRET=gkleen@mathw0h.mathinst.loc" ]; | ||
185 | }; | ||
186 | Unit = { | ||
187 | StopWhenUnneeded = true; | ||
188 | StartLimitInterval = "180s"; | ||
189 | StartLimitBurst = 7; | ||
190 | }; | ||
191 | }; | ||
178 | swayidle = { | 192 | swayidle = { |
179 | Service = { | 193 | Service = { |
180 | RuntimeDirectory = "swayidle"; | 194 | RuntimeDirectory = "swayidle"; |
@@ -356,7 +370,7 @@ in { | |||
356 | Service = { | 370 | Service = { |
357 | ExecStart = "${config.systemd.package}/lib/systemd/systemd-socket-proxyd --exit-idle-time=10s localhost:${toString (port + 1)}"; | 371 | ExecStart = "${config.systemd.package}/lib/systemd/systemd-socket-proxyd --exit-idle-time=10s localhost:${toString (port + 1)}"; |
358 | }; | 372 | }; |
359 | }) [{ host = "proxy.mathw0h"; port = 8118; } { host = "proxy.vidhar"; port = 8120; }]); | 373 | }) [{ host = "proxy.ssh.math.lmu.de"; port = 8118; } { host = "proxy.vidhar"; port = 8120; } { host = "proxy.mathw0h"; port = 8122; }]); |
360 | sockets = listToAttrs (map (port: nameValuePair "proxy-to-autossh-socks@${toString port}" { | 374 | sockets = listToAttrs (map (port: nameValuePair "proxy-to-autossh-socks@${toString port}" { |
361 | Socket = { | 375 | Socket = { |
362 | ListenStream = "%I"; | 376 | ListenStream = "%I"; |
@@ -364,7 +378,7 @@ in { | |||
364 | Install = { | 378 | Install = { |
365 | WantedBy = ["default.target"]; | 379 | WantedBy = ["default.target"]; |
366 | }; | 380 | }; |
367 | }) [8118 8120]) // { | 381 | }) [8118 8120 8122]) // { |
368 | "yt-dlp" = { | 382 | "yt-dlp" = { |
369 | Socket = { | 383 | Socket = { |
370 | SocketMode = "0600"; | 384 | SocketMode = "0600"; |
diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index e3f675a1..3a524bf1 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc | |||
@@ -272,11 +272,11 @@ l() { | |||
272 | } | 272 | } |
273 | 273 | ||
274 | re() { | 274 | re() { |
275 | systemctl --restart $@ | 275 | systemctl restart $@ |
276 | } | 276 | } |
277 | 277 | ||
278 | ure() { | 278 | ure() { |
279 | systemctl --user --restart $@ | 279 | systemctl --user restart $@ |
280 | } | 280 | } |
281 | 281 | ||
282 | ssh-installer() { | 282 | ssh-installer() { |
@@ -306,20 +306,7 @@ done < <(find ~/projects ~/uni -regextype posix-extended -maxdepth 2 -type d -re | |||
306 | sed -zr 's|(.*/([0-9]{2}[ws])/(.+))|\1 \2 \3|' | \ | 306 | sed -zr 's|(.*/([0-9]{2}[ws])/(.+))|\1 \2 \3|' | \ |
307 | sort -z -r -k2 | sort -z -s -k3 | uniq -z -f 2) | 307 | sort -z -r -k2 | sort -z -s -k3 | uniq -z -f 2) |
308 | 308 | ||
309 | alias '..'='cd ..' | ||
310 | alias rzadm=$'tmpdir -i sh -c \'mkdir adm; sshfs gkleen@mgmt01:/adm adm\'' | 309 | alias rzadm=$'tmpdir -i sh -c \'mkdir adm; sshfs gkleen@mgmt01:/adm adm\'' |
311 | alias mathcloud=$'tmpdir -i rclone mount --daemon mathcloud:// .' | 310 | alias mathcloud=$'tmpdir -i rclone mount --daemon mathcloud:// .' |
312 | alias -g L='| less' | ||
313 | alias -g S='&> /dev/null' | ||
314 | alias -g G='| grep' | ||
315 | alias -g B='&> /dev/null &' | ||
316 | alias -g BB='&> /dev/null &!' | ||
317 | 311 | ||
318 | export DEFAULT_USER=gkleen | 312 | export DEFAULT_USER=gkleen |
319 | |||
320 | bindkey -e | ||
321 | bindkey ';5C' emacs-forward-word | ||
322 | bindkey ';5D' emacs-backward-word | ||
323 | bindkey '^[[1;5C' emacs-forward-word | ||
324 | bindkey '^[[1;5D' emacs-backward-word | ||
325 | bindkey '^H' backward-kill-word | ||