summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-05-04 08:35:52 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-05-04 08:35:52 +0200
commit14003a8016ef6572a85541010e8e0b955d4bc9cd (patch)
treefbb0cba33907fb0efceb7221cfa945d9bbffa20c
parent5c899cc4ab800fcb2ff5c6eb5d5a89f9ad42aac4 (diff)
downloadnixos-14003a8016ef6572a85541010e8e0b955d4bc9cd.tar
nixos-14003a8016ef6572a85541010e8e0b955d4bc9cd.tar.gz
nixos-14003a8016ef6572a85541010e8e0b955d4bc9cd.tar.bz2
nixos-14003a8016ef6572a85541010e8e0b955d4bc9cd.tar.xz
nixos-14003a8016ef6572a85541010e8e0b955d4bc9cd.zip
...
-rw-r--r--_sources.gup2
-rw-r--r--accounts/gkleen@sif/default.nix6
-rw-r--r--accounts/gkleen@sif/emacs.el44
-rw-r--r--accounts/gkleen@sif/ssh-hosts.nix19
-rw-r--r--accounts/gkleen@sif/zshrc80
-rw-r--r--all.gup1
-rw-r--r--user-profiles/tmux/default.nix5
7 files changed, 71 insertions, 86 deletions
diff --git a/_sources.gup b/_sources.gup
index c483e204..259ef2a5 100644
--- a/_sources.gup
+++ b/_sources.gup
@@ -1,6 +1,6 @@
1#!/usr/bin/env zsh 1#!/usr/bin/env zsh
2 2
3gup --always
4gup -u nvfetcher.toml 3gup -u nvfetcher.toml
4gup --contents <(nvfetcher --version)
5[[ -d $2 ]] && cp -a $2 $1 5[[ -d $2 ]] && cp -a $2 $1
6nvfetcher -o $1 6nvfetcher -o $1
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:
2let 2let
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
diff --git a/all.gup b/all.gup
index b4789368..e9f4b2e7 100644
--- a/all.gup
+++ b/all.gup
@@ -3,3 +3,4 @@
3gup --always 3gup --always
4gup -u _sources 4gup -u _sources
5gup -u flake.lock 5gup -u flake.lock
6gup -u _sources
diff --git a/user-profiles/tmux/default.nix b/user-profiles/tmux/default.nix
index 9e66cadd..4252c099 100644
--- a/user-profiles/tmux/default.nix
+++ b/user-profiles/tmux/default.nix
@@ -20,7 +20,10 @@
20 substituteAll $src $out 20 substituteAll $src $out
21 ''; 21 '';
22 }); 22 });
23 tmuxp.enable = true;
24 }; 23 };
24
25 # home.packages = [
26 # (pkgs.tmuxp.override { python3Packages = pkgs.python37Packages; })
27 # ];
25 }; 28 };
26} 29}