diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-05-04 08:35:52 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-05-04 08:35:52 +0200 |
commit | 14003a8016ef6572a85541010e8e0b955d4bc9cd (patch) | |
tree | fbb0cba33907fb0efceb7221cfa945d9bbffa20c /accounts/gkleen@sif | |
parent | 5c899cc4ab800fcb2ff5c6eb5d5a89f9ad42aac4 (diff) | |
download | nixos-14003a8016ef6572a85541010e8e0b955d4bc9cd.tar nixos-14003a8016ef6572a85541010e8e0b955d4bc9cd.tar.gz nixos-14003a8016ef6572a85541010e8e0b955d4bc9cd.tar.bz2 nixos-14003a8016ef6572a85541010e8e0b955d4bc9cd.tar.xz nixos-14003a8016ef6572a85541010e8e0b955d4bc9cd.zip |
...
Diffstat (limited to 'accounts/gkleen@sif')
-rw-r--r-- | accounts/gkleen@sif/default.nix | 6 | ||||
-rw-r--r-- | accounts/gkleen@sif/emacs.el | 44 | ||||
-rw-r--r-- | accounts/gkleen@sif/ssh-hosts.nix | 19 | ||||
-rw-r--r-- | accounts/gkleen@sif/zshrc | 80 |
4 files changed, 65 insertions, 84 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 7853bd5d..0ee62708 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { flake, flakeInputs, userName, pkgs, customUtils, lib, config, sources, ... }@inputs: | 1 | { flake, flakeInputs, userName, pkgs, customUtils, lib, config, sources, ... }@inputs: |
2 | let | 2 | let |
3 | cfg = config.home-manager.users.${userName}; | 3 | cfg = config.home-manager.users.${userName}; |
4 | xmonad = import ./xmonad pkgs.haskellPackages; | 4 | xmonad = import ./xmonad pkgs.haskell.packages.ghc8107; |
5 | emacsScratch = pkgs.stdenv.mkDerivation (sources.emacs-scratch_el // rec { | 5 | emacsScratch = pkgs.stdenv.mkDerivation (sources.emacs-scratch_el // rec { |
6 | phases = [ "installPhase" ]; | 6 | phases = [ "installPhase" ]; |
7 | 7 | ||
@@ -89,7 +89,7 @@ in { | |||
89 | evil evil-dvorak undo-tree magit haskell-mode | 89 | evil evil-dvorak undo-tree magit haskell-mode |
90 | nix-mode yaml-mode json-mode shakespeare-mode | 90 | nix-mode yaml-mode json-mode shakespeare-mode |
91 | smart-mode-line highlight-parentheses highlight-symbol | 91 | smart-mode-line highlight-parentheses highlight-symbol |
92 | notmuch ag sass-mode lua-mode fira-code-mode use-package | 92 | ag sass-mode lua-mode fira-code-mode use-package # notmuch |
93 | use-package-ensure-system-package git-gutter emacsScratch | 93 | use-package-ensure-system-package git-gutter emacsScratch |
94 | edit-server mediawiki | 94 | edit-server mediawiki |
95 | ]; | 95 | ]; |
@@ -184,7 +184,7 @@ in { | |||
184 | }; | 184 | }; |
185 | taffybar = { | 185 | taffybar = { |
186 | enable = true; | 186 | enable = true; |
187 | package = import ./taffybar { inherit (pkgs) haskellPackages; }; | 187 | package = import ./taffybar { haskellPackages = pkgs.haskell.packages.ghc8107; }; |
188 | }; | 188 | }; |
189 | status-notifier-watcher.enable = true; | 189 | status-notifier-watcher.enable = true; |
190 | xembed-sni-proxy.enable = true; | 190 | xembed-sni-proxy.enable = true; |
diff --git a/accounts/gkleen@sif/emacs.el b/accounts/gkleen@sif/emacs.el index fbbd1ec9..d4b1a092 100644 --- a/accounts/gkleen@sif/emacs.el +++ b/accounts/gkleen@sif/emacs.el | |||
@@ -100,28 +100,28 @@ | |||
100 | (setq edit-server-new-frame nil) | 100 | (setq edit-server-new-frame nil) |
101 | (setq edit-server-url-major-mode-alist '(("rzint\\.mathinst\\.loc" . mediawiki-mode))) | 101 | (setq edit-server-url-major-mode-alist '(("rzint\\.mathinst\\.loc" . mediawiki-mode))) |
102 | 102 | ||
103 | (setq notmuch-address-internal-completion '(received nil)) | 103 | ;; (setq notmuch-address-internal-completion '(received nil)) |
104 | (setq notmuch-always-prompt-for-sender t) | 104 | ;; (setq notmuch-always-prompt-for-sender t) |
105 | (setq notmuch-command "notmuch-ssh") | 105 | ;; (setq notmuch-command "notmuch-ssh") |
106 | (setq notmuch-crypto-process-mime t) | 106 | ;; (setq notmuch-crypto-process-mime t) |
107 | (setq notmuch-draft-tags '("+draft" "-inbox")) | 107 | ;; (setq notmuch-draft-tags '("+draft" "-inbox")) |
108 | (setq notmuch-fcc-dirs nil) | 108 | ;; (setq notmuch-fcc-dirs nil) |
109 | (setq notmuch-hello-sections '(notmuch-hello-insert-header notmuch-hello-insert-saved-searches)) | 109 | ;; (setq notmuch-hello-sections '(notmuch-hello-insert-header notmuch-hello-insert-saved-searches)) |
110 | (setq notmuch-hello-thousands-separator " ") | 110 | ;; (setq notmuch-hello-thousands-separator " ") |
111 | (setq notmuch-identities '("gkleen@yggdrasil.li" "g@141.li" "kleen@cip.ifi.lmu.de" "Gregor.Kleen@stud.ifi.lmu.de" "G.Kleen@campus.lmu.de" "G.Kleen@lmu.de" "gregor.kleen@ifi.lmu.de" "uni2work@ifi.lmu.de" "gregor@kleen.li")) | 111 | ;; (setq notmuch-identities '("gkleen@yggdrasil.li" "g@141.li" "kleen@cip.ifi.lmu.de" "Gregor.Kleen@stud.ifi.lmu.de" "G.Kleen@campus.lmu.de" "G.Kleen@lmu.de" "gregor.kleen@ifi.lmu.de" "uni2work@ifi.lmu.de" "gregor@kleen.li")) |
112 | (setq notmuch-message-headers '("Subject" "To" "Cc" "Date")) | 112 | ;; (setq notmuch-message-headers '("Subject" "To" "Cc" "Date")) |
113 | (setq notmuch-message-replied-tags '("+replied" "-unread" "-inbox")) | 113 | ;; (setq notmuch-message-replied-tags '("+replied" "-unread" "-inbox")) |
114 | (setq notmuch-saved-searches | 114 | ;; (setq notmuch-saved-searches |
115 | (quote | 115 | ;; (quote |
116 | ((:name "inbox" :query "tag:inbox" :key "i") | 116 | ;; ((:name "inbox" :query "tag:inbox" :key "i") |
117 | (:name "unread" :query "tag:unread AND tag:inbox" :key "u") | 117 | ;; (:name "unread" :query "tag:unread AND tag:inbox" :key "u") |
118 | (:name "drafts" :query "tag:draft" :key "d") | 118 | ;; (:name "drafts" :query "tag:draft" :key "d") |
119 | (:name "all mail" :query "date:month.." :key "a" :count-query "*") | 119 | ;; (:name "all mail" :query "date:month.." :key "a" :count-query "*") |
120 | (:name "sent" :query "is:sent" :key "s" :count-query "is:sent") | 120 | ;; (:name "sent" :query "is:sent" :key "s" :count-query "is:sent") |
121 | ))) | 121 | ;; ))) |
122 | (setq notmuch-search-oldest-first nil) | 122 | ;; (setq notmuch-search-oldest-first nil) |
123 | (setq notmuch-show-all-tags-list t) | 123 | ;; (setq notmuch-show-all-tags-list t) |
124 | (setq notmuch-show-logo nil) | 124 | ;; (setq notmuch-show-logo nil) |
125 | 125 | ||
126 | (setq send-mail-function 'sendmail-send-it) | 126 | (setq send-mail-function 'sendmail-send-it) |
127 | (setq mail-envelope-from 'header) | 127 | (setq mail-envelope-from 'header) |
diff --git a/accounts/gkleen@sif/ssh-hosts.nix b/accounts/gkleen@sif/ssh-hosts.nix index 72bf6520..44b5fa63 100644 --- a/accounts/gkleen@sif/ssh-hosts.nix +++ b/accounts/gkleen@sif/ssh-hosts.nix | |||
@@ -174,25 +174,6 @@ | |||
174 | user = "uni2work"; | 174 | user = "uni2work"; |
175 | identityFile = "~/.ssh/letz"; | 175 | identityFile = "~/.ssh/letz"; |
176 | }; | 176 | }; |
177 | "git.odin" = | ||
178 | { hostname = "odin.asgard.yggdrasil"; | ||
179 | user = "gitolite"; | ||
180 | }; | ||
181 | "notmuch.odin" = | ||
182 | { hostname = "odin.asgard.yggdrasil"; | ||
183 | identityFile = "~/.ssh/notmuch.odin.asgard.yggdrasil"; | ||
184 | }; | ||
185 | "status.odin" = | ||
186 | { hostname = "odin.asgard.yggdrasil"; | ||
187 | identityFile = "~/.ssh/status.odin.asgard.yggdrasil"; | ||
188 | extraOptions.ControlPath = "~/.ssh/status-%r@%n:%p"; | ||
189 | }; | ||
190 | "moden" = | ||
191 | { hostname = "oristano.tcs.ifi.lmu.de"; | ||
192 | user = "gkleen"; | ||
193 | port = 30363; | ||
194 | identityFile = "~/.ssh/gkleen@oristano.tcs.ifi.lmu.de"; | ||
195 | }; | ||
196 | "ubuntu1804" = | 177 | "ubuntu1804" = |
197 | { hostname = "192.168.122.30"; | 178 | { hostname = "192.168.122.30"; |
198 | identityFile = "~/.ssh/gkleen@sif.midgard.yggdrasil"; | 179 | identityFile = "~/.ssh/gkleen@sif.midgard.yggdrasil"; |
diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index bcdc662a..712ec690 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc | |||
@@ -111,7 +111,7 @@ dir() { | |||
111 | forceShell=false | 111 | forceShell=false |
112 | wormhole=false | 112 | wormhole=false |
113 | gitWorktree="" | 113 | gitWorktree="" |
114 | notmuchMsg="" | 114 | # notmuchMsg="" |
115 | quickserve=false | 115 | quickserve=false |
116 | 116 | ||
117 | while getopts ':t:a:s:Sd:ir:wqg:n:' arg; do | 117 | while getopts ':t:a:s:Sd:ir:wqg:n:' arg; do |
@@ -132,7 +132,7 @@ dir() { | |||
132 | "r") repoUrl=${OPTARG} ;; | 132 | "r") repoUrl=${OPTARG} ;; |
133 | "w") wormhole=true ;; | 133 | "w") wormhole=true ;; |
134 | "g") gitWorktree=${OPTARG} ;; | 134 | "g") gitWorktree=${OPTARG} ;; |
135 | "n") notmuchMsg=${OPTARG} ;; | 135 | # "n") notmuchMsg=${OPTARG} ;; |
136 | "q") quickserve=true ;; | 136 | "q") quickserve=true ;; |
137 | *) printf "Invalid option: %s\n" $arg >&2; exit 2 ;; | 137 | *) printf "Invalid option: %s\n" $arg >&2; exit 2 ;; |
138 | esac | 138 | esac |
@@ -189,56 +189,56 @@ dir() { | |||
189 | fi | 189 | fi |
190 | 190 | ||
191 | 191 | ||
192 | if [[ -n ${notmuchMsg} ]]; then | 192 | # if [[ -n ${notmuchMsg} ]]; then |
193 | getMimeTypes() { | 193 | # getMimeTypes() { |
194 | nix-shell -p mailcap --run "find \${buildInputs} -path '*/etc/mime.types' | head -n 1 | xargs -- cat" | 194 | # nix-shell -p mailcap --run "find \${buildInputs} -path '*/etc/mime.types' | head -n 1 | xargs -- cat" |
195 | } | 195 | # } |
196 | 196 | ||
197 | typeset -a messages | 197 | # typeset -a messages |
198 | messages=(${(z)$(notmuch search --output=messages ${notmuchMsg})}) | 198 | # messages=(${(z)$(notmuch search --output=messages ${notmuchMsg})}) |
199 | 199 | ||
200 | for message (${messages}); do | 200 | # for message (${messages}); do |
201 | typeset -A notmuchAtts | 201 | # typeset -A notmuchAtts |
202 | notmuchAtts=() | 202 | # notmuchAtts=() |
203 | 203 | ||
204 | while IFS= read -r -d $'\n' line; do | 204 | # while IFS= read -r -d $'\n' line; do |
205 | [[ ${line} =~ '(attachment|part)\{ ID: ([0-9]+)' ]] || continue | 205 | # [[ ${line} =~ '(attachment|part)\{ ID: ([0-9]+)' ]] || continue |
206 | attId=${match[2]} | 206 | # attId=${match[2]} |
207 | 207 | ||
208 | [[ ${line} =~ 'Content-type: multipart/' ]] && continue | 208 | # [[ ${line} =~ 'Content-type: multipart/' ]] && continue |
209 | 209 | ||
210 | fName="part_${attId}" | 210 | # fName="part_${attId}" |
211 | [[ ${line} =~ 'Filename: (([^,]|,[^ ])+)' ]] && fName=${match[1]} | 211 | # [[ ${line} =~ 'Filename: (([^,]|,[^ ])+)' ]] && fName=${match[1]} |
212 | 212 | ||
213 | if [[ ${#messages} -gt 1 ]]; then | 213 | # if [[ ${#messages} -gt 1 ]]; then |
214 | fName="${message}/${fName}" | 214 | # fName="${message}/${fName}" |
215 | fi | 215 | # fi |
216 | 216 | ||
217 | fExt="${fName:e}" | 217 | # fExt="${fName:e}" |
218 | [[ -n "${fExt}" ]] && fName="${fName:r}" | 218 | # [[ -n "${fExt}" ]] && fName="${fName:r}" |
219 | 219 | ||
220 | if [[ -z "${fExt}" && ${line} =~ 'Content-type: (([^,]|,[^ ])+)$' ]]; then | 220 | # if [[ -z "${fExt}" && ${line} =~ 'Content-type: (([^,]|,[^ ])+)$' ]]; then |
221 | fExt=$(getMimeTypes | grep ${match[1]}$'\t' | head -n 1 | awk '{ print $2; }') | 221 | # fExt=$(getMimeTypes | grep ${match[1]}$'\t' | head -n 1 | awk '{ print $2; }') |
222 | fi | 222 | # fi |
223 | 223 | ||
224 | mkdir -p ${fName:h} | 224 | # mkdir -p ${fName:h} |
225 | if [[ -n "${fExt}" ]]; then | 225 | # if [[ -n "${fExt}" ]]; then |
226 | fName=$(mktemp -p . "${fName}.XXXXXX.${fExt}") | 226 | # fName=$(mktemp -p . "${fName}.XXXXXX.${fExt}") |
227 | else | 227 | # else |
228 | fName=$(mktemp -p . "${fName}.XXXXXX") | 228 | # fName=$(mktemp -p . "${fName}.XXXXXX") |
229 | fi | 229 | # fi |
230 | 230 | ||
231 | notmuchAtts[${attId}]=${fName} | 231 | # notmuchAtts[${attId}]=${fName} |
232 | done <<(notmuch show --decrypt=false -- ${message} | tr -d $'\f') | 232 | # done <<(notmuch show --decrypt=false -- ${message} | tr -d $'\f') |
233 | 233 | ||
234 | for attId fName in ${(kv)notmuchAtts}; do | 234 | # for attId fName in ${(kv)notmuchAtts}; do |
235 | [[ -d ${fName:h} ]] || mkdir -p ${fName:h} | 235 | # [[ -d ${fName:h} ]] || mkdir -p ${fName:h} |
236 | printf "#%d → ‘%s’\n" "${attId}" "${fName}" >&2 | 236 | # printf "#%d → ‘%s’\n" "${attId}" "${fName}" >&2 |
237 | 237 | ||
238 | notmuch show --decrypt=false --part=${attId} -- ${message} | pv -W -D 2 -i 0.1 >${fName} | 238 | # notmuch show --decrypt=false --part=${attId} -- ${message} | pv -W -D 2 -i 0.1 >${fName} |
239 | done | 239 | # done |
240 | done | 240 | # done |
241 | fi | 241 | # fi |
242 | 242 | ||
243 | 243 | ||
244 | ${wormhole} && wormhole receive | 244 | ${wormhole} && wormhole receive |