summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif')
-rw-r--r--accounts/gkleen@sif/default.nix59
-rw-r--r--accounts/gkleen@sif/dunst-settings.nix3
-rw-r--r--accounts/gkleen@sif/emacs.el7
-rwxr-xr-xaccounts/gkleen@sif/scripts/mute.zsh18
-rw-r--r--accounts/gkleen@sif/ssh-hosts.nix22
-rw-r--r--accounts/gkleen@sif/xmobar/xmobar.hs2
-rw-r--r--accounts/gkleen@sif/xmonad/xmonad.hs7
7 files changed, 100 insertions, 18 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix
index 9dbe4634..991d7f7f 100644
--- a/accounts/gkleen@sif/default.nix
+++ b/accounts/gkleen@sif/default.nix
@@ -10,6 +10,43 @@ let
10 mimeType = "text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;"; 10 mimeType = "text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;";
11 exec = "${config.home-manager.users.${userName}.programs.emacs.package}/bin/emacsclient -a \"\" %F"; 11 exec = "${config.home-manager.users.${userName}.programs.emacs.package}/bin/emacsclient -a \"\" %F";
12 }; 12 };
13 emacsScratch = pkgs.stdenv.mkDerivation rec {
14 pname = "scratch";
15 version = "0077334cc299aa7885f804d88f52cdb1b35caf71";
16
17 src = pkgs.fetchFromGitHub {
18 owner = "ffevotte";
19 repo = "scratch.el";
20 rev = version;
21 sha256 = "sha256-FUkKJ+1COGzgllzzv51yUIjMZI6slOFVExdwWl2ZEBA=";
22 };
23
24 phases = [ "installPhase" ];
25
26 installPhase = ''
27 mkdir -p $out/share/emacs/site-lisp
28 cp $src/scratch.el $out/share/emacs/site-lisp/default.el
29 '';
30 };
31 muteScript = pkgs.stdenv.mkDerivation {
32 name = "mute";
33 src = ./scripts/mute.zsh;
34
35 buildInputs = with pkgs; [ makeWrapper ];
36
37 phases = [ "installPhase" ];
38
39 installPhase = ''
40 mkdir -p $out/bin
41 install -m 0755 $src $out/bin/mute
42 wrapProgram $out/bin/mute \
43 --prefix PATH : ${pkgs.zsh}/bin \
44 --prefix PATH : ${pkgs.findutils}/bin \
45 --prefix PATH : ${pkgs.util-linux}/bin \
46 --prefix PATH : ${pkgs.coreutils}/bin \
47 --prefix PATH : ${pkgs.pulseaudio}/bin
48 '';
49 };
13in { 50in {
14 imports = with flake.nixosModules.userProfiles.${userName}; [ 51 imports = with flake.nixosModules.userProfiles.${userName}; [
15 mpv 52 mpv
@@ -20,8 +57,8 @@ in {
20 ssh = { 57 ssh = {
21 matchBlocks = import ./ssh-hosts.nix; # customUtils.recImport { dir = ./ssh-hosts; }; 58 matchBlocks = import ./ssh-hosts.nix; # customUtils.recImport { dir = ./ssh-hosts; };
22 extraConfig = '' 59 extraConfig = ''
23 Match host uniworx3.ifi.lmu.de,uniworx4.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" 60 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"
24 ProxyJump gate 61 ProxyJump gate2
25 62
26 Host * 63 Host *
27 ''; 64 '';
@@ -33,8 +70,8 @@ in {
33 evil evil-dvorak evil-magit undo-tree magit haskell-mode 70 evil evil-dvorak evil-magit undo-tree magit haskell-mode
34 nix-mode yaml-mode json-mode shakespeare-mode 71 nix-mode yaml-mode json-mode shakespeare-mode
35 smart-mode-line highlight-parentheses highlight-symbol 72 smart-mode-line highlight-parentheses highlight-symbol
36 notmuch ag sass-mode lua-mode fira-code-mode 73 notmuch ag sass-mode lua-mode fira-code-mode use-package
37 use-package use-package-ensure-system-package git-gutter 74 use-package-ensure-system-package git-gutter emacsScratch
38 ]; 75 ];
39 }; 76 };
40 firefox = { 77 firefox = {
@@ -97,12 +134,18 @@ in {
97 docs = "$HOME/documents"; 134 docs = "$HOME/documents";
98 dl = "$HOME/Downloads"; 135 dl = "$HOME/Downloads";
99 flk = "$HOME/config/nixos-flakes"; 136 flk = "$HOME/config/nixos-flakes";
137 fsk-timi = "$HOME/projects/21s/fsk-timi";
138 };
139
140 obs-studio = {
141 enable = true;
142 plugins = with pkgs; [obs-v4l2sink];
100 }; 143 };
101 }; 144 };
102 145
103 services = { 146 services = {
104 dunst = { 147 dunst = {
105 settings = import ./dunst-settings.nix; 148 settings = import ./dunst-settings.nix inputs;
106 iconTheme = cfg.gtk.iconTheme; 149 iconTheme = cfg.gtk.iconTheme;
107 enable = true; 150 enable = true;
108 }; 151 };
@@ -130,8 +173,8 @@ in {
130 sxhkd = { 173 sxhkd = {
131 enable = true; 174 enable = true;
132 keybindings = { 175 keybindings = {
133 "button8" = "${pkgs.pulseaudio}/bin/pacmd set-source-mute @DEFAULT_SOURCE@ 0"; 176 "button8" = "${muteScript}/bin/mute unmute";
134 "@button8" = "${pkgs.pulseaudio}/bin/pacmd set-source-mute @DEFAULT_SOURCE@ 1"; 177 "@button8" = "${muteScript}/bin/mute mute";
135 "button9" = "${pkgs.pulseaudio}/bin/pacmd set-sink-mute @DEFAULT_SINK@ 1"; 178 "button9" = "${pkgs.pulseaudio}/bin/pacmd set-sink-mute @DEFAULT_SINK@ 1";
136 "@button9" = "${pkgs.pulseaudio}/bin/pacmd set-sink-mute @DEFAULT_SINK@ 0"; 179 "@button9" = "${pkgs.pulseaudio}/bin/pacmd set-sink-mute @DEFAULT_SINK@ 0";
137 }; 180 };
@@ -179,7 +222,7 @@ in {
179 google-play-music-desktop-player qt5ct playerctl evince 222 google-play-music-desktop-player qt5ct playerctl evince
180 thunderbird zulip zoom-us steam steam-run wireshark skype 223 thunderbird zulip zoom-us steam steam-run wireshark skype
181 virt-manager rclone cached-nix-shell xournal discord xmonad 224 virt-manager rclone cached-nix-shell xournal discord xmonad
182 worktime fira-code-symbols emacsclientDesktopItem 225 worktime fira-code-symbols emacsclientDesktopItem libreoffice
183 ]; 226 ];
184 227
185 file = { 228 file = {
diff --git a/accounts/gkleen@sif/dunst-settings.nix b/accounts/gkleen@sif/dunst-settings.nix
index 8319da03..8abdfc5a 100644
--- a/accounts/gkleen@sif/dunst-settings.nix
+++ b/accounts/gkleen@sif/dunst-settings.nix
@@ -1,3 +1,4 @@
1{ pkgs, ... }:
1{ 2{
2 global = { 3 global = {
3 font = "Monospace 6"; 4 font = "Monospace 6";
@@ -25,6 +26,8 @@
25 icon_position = "right"; 26 icon_position = "right";
26 sort = false; 27 sort = false;
27 sticky_history = false; 28 sticky_history = false;
29
30 dmenu = "${pkgs.dmenu}/bin/dmenu";
28 }; 31 };
29 shortcuts = { 32 shortcuts = {
30 close = "ctrl+space"; 33 close = "ctrl+space";
diff --git a/accounts/gkleen@sif/emacs.el b/accounts/gkleen@sif/emacs.el
index d7080e36..c8356bf2 100644
--- a/accounts/gkleen@sif/emacs.el
+++ b/accounts/gkleen@sif/emacs.el
@@ -31,6 +31,13 @@
31(custom-set-variables '(git-gutter:update-interval 2)) 31(custom-set-variables '(git-gutter:update-interval 2))
32(custom-set-variables '(git-gutter:hide-gutter t)) 32(custom-set-variables '(git-gutter:hide-gutter t))
33 33
34;; (require 'scratch)
35(global-set-key (kbd "C-x B") 'scratch-create)
36(setq initial-major-mode 'scratch-mode)
37(setq initial-scratch-message "")
38
39(global-set-key (kbd "C-x K") 'kill-current-buffer)
40
34(setq backup-directory-alist `(("." . "~/.saves"))) 41(setq backup-directory-alist `(("." . "~/.saves")))
35(setq undo-tree-history-directory-alist `(("." . "~/.undo"))) 42(setq undo-tree-history-directory-alist `(("." . "~/.undo")))
36(setq delete-old-versions t 43(setq delete-old-versions t
diff --git a/accounts/gkleen@sif/scripts/mute.zsh b/accounts/gkleen@sif/scripts/mute.zsh
new file mode 100755
index 00000000..1b30ad67
--- /dev/null
+++ b/accounts/gkleen@sif/scripts/mute.zsh
@@ -0,0 +1,18 @@
1#!/usr/bin/env zsh
2
3lockFile=~/.mute.flock
4
5case $1 in
6 mute)
7 (
8 flock -n 9 || exit 1
9 sleep 0.2
10 pacmd set-source-mute @DEFAULT_SOURCE@ 1
11 ) 9<>${lockFile} &
12 ;;
13 unmute)
14 set -o pipefail
15 while fuser ${lockFile} 2>/dev/null | cut -d ':' -f 2- | xargs -r -- kill; do sleep 0.001; done
16 pacmd set-source-mute @DEFAULT_SOURCE@ 0
17 ;;
18esac
diff --git a/accounts/gkleen@sif/ssh-hosts.nix b/accounts/gkleen@sif/ssh-hosts.nix
index 8937e743..0db4e342 100644
--- a/accounts/gkleen@sif/ssh-hosts.nix
+++ b/accounts/gkleen@sif/ssh-hosts.nix
@@ -77,7 +77,10 @@
77 port = 30363; 77 port = 30363;
78 identityFile = "~/.ssh/testworx"; 78 identityFile = "~/.ssh/testworx";
79 }; 79 };
80 "remote.cip.ifi.lmu.de".user = "kleen"; 80 "remote.cip.ifi.lmu.de" =
81 { user = "kleen";
82 identityFile = "~/.ssh/gkleen@sif.midgard.yggdrasil";
83 };
81 "uniworx3" = 84 "uniworx3" =
82 { hostname = "uniworx3.ifi.lmu.de"; 85 { hostname = "uniworx3.ifi.lmu.de";
83 user = "root"; 86 user = "root";
@@ -93,15 +96,14 @@
93 user = "root"; 96 user = "root";
94 identityFile = "~/.ssh/uni2work"; 97 identityFile = "~/.ssh/uni2work";
95 }; 98 };
96 "uniworxdb" = 99 "uniworxdb2" =
97 { hostname = "uniworxdb"; 100 { hostname = "uniworxdb2";
98 proxyJump = "uniworx4"; 101 proxyJump = "uniworx4";
99 user = "root"; 102 user = "root";
100 identityFile = "~/.ssh/uni2work"; 103 identityFile = "~/.ssh/uni2work";
101 }; 104 };
102 "uniworxdb2" = 105 "uniworx5" =
103 { hostname = "uniworxdb2"; 106 { hostname = "uniworx5.ifi.lmu.de";
104 proxyJump = "uniworx4";
105 user = "root"; 107 user = "root";
106 identityFile = "~/.ssh/uni2work"; 108 identityFile = "~/.ssh/uni2work";
107 }; 109 };
@@ -109,12 +111,14 @@
109 { hostname = "gate2.tcs.ifi.lmu.de"; 111 { hostname = "gate2.tcs.ifi.lmu.de";
110 user = "gkleen"; 112 user = "gkleen";
111 identityFile = "~/.ssh/tcs"; 113 identityFile = "~/.ssh/tcs";
114 serverAliveInterval = 0;
112 }; 115 };
113 "proxy.gate2" = 116 "proxy.gate2" =
114 { hostname = "gate2.tcs.ifi.lmu.de"; 117 { hostname = "gate2.tcs.ifi.lmu.de";
115 user = "gkleen"; 118 user = "gkleen";
116 identityFile = "~/.ssh/proxy.gkleen@tcs.ifi.lmu.de"; 119 identityFile = "~/.ssh/proxy.gkleen@tcs.ifi.lmu.de";
117 dynamicForwards = [ { port = 8118; } ]; 120 dynamicForwards = [ { port = 8118; } ];
121 serverAliveInterval = 0;
118 extraOptions = { 122 extraOptions = {
119 ExitOnForwardFailure = "yes"; 123 ExitOnForwardFailure = "yes";
120 }; 124 };
@@ -123,6 +127,7 @@
123 { hostname = "gate2.tcs.ifi.lmu.de"; 127 { hostname = "gate2.tcs.ifi.lmu.de";
124 user = "gkleen"; 128 user = "gkleen";
125 identityFile = "~/.ssh/proxy.gkleen@tcs.ifi.lmu.de"; 129 identityFile = "~/.ssh/proxy.gkleen@tcs.ifi.lmu.de";
130 serverAliveInterval = 0;
126 extraOptions = { 131 extraOptions = {
127 ExitOnForwardFailure = "yes"; 132 ExitOnForwardFailure = "yes";
128 }; 133 };
@@ -196,4 +201,9 @@
196 { hostname = "gitlab.haskell.org"; 201 { hostname = "gitlab.haskell.org";
197 identityFile = "~/.ssh/gkleen@gitlab.haskell.org"; 202 identityFile = "~/.ssh/gkleen@gitlab.haskell.org";
198 }; 203 };
204 "gitlab.lrz.de" =
205 { hostname = "gitlab.lrz.de";
206 user = "git";
207 identityFile = "~/.ssh/gkleen@gitlab.lrz.de";
208 };
199} 209}
diff --git a/accounts/gkleen@sif/xmobar/xmobar.hs b/accounts/gkleen@sif/xmobar/xmobar.hs
index ed1f6e55..74ce7347 100644
--- a/accounts/gkleen@sif/xmobar/xmobar.hs
+++ b/accounts/gkleen@sif/xmobar/xmobar.hs
@@ -10,7 +10,7 @@ main = xmobar config
10 { font = "xft:FiraCode Nerd Font Mono:style=Regular:pixelsize=21" 10 { font = "xft:FiraCode Nerd Font Mono:style=Regular:pixelsize=21"
11 , position = OnScreen 0 $ TopP 0 307 11 , position = OnScreen 0 $ TopP 0 307
12 , bgColor = "black" 12 , bgColor = "black"
13 , fgColor = "grey" 13 , fgColor = "#808080"
14 , overrideRedirect = False 14 , overrideRedirect = False
15 , template = 15 , template =
16 let left = intercalate " | " 16 let left = intercalate " | "
diff --git a/accounts/gkleen@sif/xmonad/xmonad.hs b/accounts/gkleen@sif/xmonad/xmonad.hs
index 7113b4e3..425beaf4 100644
--- a/accounts/gkleen@sif/xmonad/xmonad.hs
+++ b/accounts/gkleen@sif/xmonad/xmonad.hs
@@ -234,6 +234,7 @@ hostFromName h
234 -- , (xK_p, [mkPassPrompt "Type password" pwType xPConfig, mkPassPrompt "Show password" pwShow xPConfig, mkPassPrompt "Copy password" pwClip xPConfig]) 234 -- , (xK_p, [mkPassPrompt "Type password" pwType xPConfig, mkPassPrompt "Show password" pwShow xPConfig, mkPassPrompt "Copy password" pwClip xPConfig])
235 , (xK_w, ["sudo rewacom"]) 235 , (xK_w, ["sudo rewacom"])
236 , (xK_y, [ "tmux new-window -dt media /var/media/link.hs $(xclip -o)" 236 , (xK_y, [ "tmux new-window -dt media /var/media/link.hs $(xclip -o)"
237 , "tmux new-window -dt media /var/media/download.hs $(xclip -o)"
237 , "urxvtc -name media -e tmuxp load /var/media" 238 , "urxvtc -name media -e tmuxp load /var/media"
238 ]) 239 ])
239 , (xK_l, [ "tmux new-window -dt media mpv $(xclip -o)" 240 , (xK_l, [ "tmux new-window -dt media mpv $(xclip -o)"
@@ -548,10 +549,10 @@ main = do
548 sqrtTwo = approxRational (sqrt 2) (1 / 2560) 549 sqrtTwo = approxRational (sqrt 2) (1 / 2560)
549 xmobarPP' = xmobarPP { ppTitle = shorten 80 550 xmobarPP' = xmobarPP { ppTitle = shorten 80
550 , ppSort = (liftM2 (.)) getSortByIndex $ return scratchpadFilterOutWorkspace 551 , ppSort = (liftM2 (.)) getSortByIndex $ return scratchpadFilterOutWorkspace
551 , ppUrgent = wrap "(" ")" . xmobarColor "red" "" 552 , ppUrgent = wrap "(" ")" . xmobarColor "#800000" ""
552 , ppHiddenNoWindows = xmobarColor "#202020" "" . wrap "(" ")" 553 , ppHiddenNoWindows = xmobarColor "#202020" "" . wrap "(" ")"
553 , ppVisible = wrap "(" ")" . xmobarColor "yellow" "" 554 , ppVisible = wrap "(" ")" . xmobarColor "#808000" ""
554 , ppCurrent = wrap "(" ")" . xmobarColor "green" "" 555 , ppCurrent = wrap "(" ")" . xmobarColor "#008000" ""
555 , ppHidden = wrap "(" ")" 556 , ppHidden = wrap "(" ")"
556 , ppWsSep = " " 557 , ppWsSep = " "
557 , ppSep = "\n" 558 , ppSep = "\n"