summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2023-07-10 10:53:07 +0200
committerMike Vink <mike1994vink@gmail.com>2023-07-10 10:53:07 +0200
commitaee8baaac3d3e39e90c08d9c7a3a6bf806071ae4 (patch)
tree5f0ebbc5cbf1173ee4910e037d4ccd7e28f2146b
parent7d78321c0ed6b3ae9f56ddb5f502110212d8fb86 (diff)
stuff
-rw-r--r--configuration.nix5
-rw-r--r--email/neomutt.nix3
-rw-r--r--home.nix24
-rw-r--r--home/packages.nix2
-rwxr-xr-xshell-scripts/kakup15
-rw-r--r--shell-scripts/sb-clock2
6 files changed, 42 insertions, 9 deletions
diff --git a/configuration.nix b/configuration.nix
index c414100..a82d1ed 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -111,7 +111,12 @@
services.xserver.displayManager.startx.enable = true;
services.xserver.libinput.enable = true;
+ services.udev.packages = [ pkgs.yubikey-personalization ];
services.pcscd.enable = true;
+ security.pam.services = {
+ login.u2fAuth = true;
+ sudo.u2fAuth = true;
+ };
sound.enable = true;
security.rtkit.enable = true;
diff --git a/email/neomutt.nix b/email/neomutt.nix
index a7ec0b9..6b4b354 100644
--- a/email/neomutt.nix
+++ b/email/neomutt.nix
@@ -177,7 +177,8 @@
{ map = ["pager"]; key = "G"; action = "bottom"; }
{ map = ["index" "pager" "browser"]; key = "d"; action = "half-down"; }
{ map = ["index" "pager" "browser"]; key = "u"; action = "half-up"; }
- { map = ["index" "pager"]; key = "R"; action = "group-reply"; }
+ { map = ["index" "pager"]; key = "\\Cr"; action = "group-reply"; }
+ { map = ["index" "pager"]; key = "R"; action = "group-chat-reply"; }
{ map = ["index"]; key = "\031"; action = "previous-undeleted"; }
{ map = ["index"]; key = "\005"; action = "next-undeleted"; }
{ map = ["pager"]; key = "\031"; action = "previous-line"; }
diff --git a/home.nix b/home.nix
index 73b1da9..baa2e7c 100644
--- a/home.nix
+++ b/home.nix
@@ -100,6 +100,11 @@
set -as terminal-overrides ',xterm*:RGB'
set-option -g focus-events on
set-option -sg escape-time 10
+ # unbind C-b
+ # set -g prefix C-space
+ # bind C-space send-prefix
+
+ bind-key R source ${config.xdg.configHome}/tmux/tmux.conf; display-message "sourced ${config.xdg.configHome}/tmux/tmux.conf!"
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
@@ -107,6 +112,22 @@
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind-key -T copy-mode-vi : command-prompt
+ bind-key -T window k select-pane -t '{up-of}'
+ bind-key -T window j select-pane -t '{down-of}'
+ bind-key -T window l select-pane -t '{right-of}'
+ bind-key -T window h select-pane -t '{left-of}'
+ bind-key -T window = select-layout even-vertical
+ bind-key -T window o kill-pane -a
+ bind-key -T window n run-shell '
+ window="$(tmux display -p "#{window_name}")"
+ if [[ "''${window##kakc@}" != "$window" ]]; then
+ tmux splitw "kak -c ''${window##kakc@}"
+ else
+ tmux splitw "kak -c ''${KAK_SERVER##kaks@}"
+ fi
+ '
+ bind -n C-space switch-client -T window
+
bind -n C-s run-shell tmux-normal-mode
bind -n C-q run-shell 'tmux-normal-mode --quit'
'';
@@ -176,6 +197,9 @@
# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html
programs.gpg = {
enable = true;
+ scdaemonSettings = {
+ disable-ccid = true;
+ };
settings = {
personal-cipher-preferences = "AES256 AES192 AES";
personal-digest-preferences = "SHA512 SHA384 SHA256";
diff --git a/home/packages.nix b/home/packages.nix
index 7a6a44e..cc4fb91 100644
--- a/home/packages.nix
+++ b/home/packages.nix
@@ -27,6 +27,8 @@
dnsutils
iputils
inetutils
+ usbutils
+ calcurse
profanity
file
lf
diff --git a/shell-scripts/kakup b/shell-scripts/kakup
index df9b17f..915a95a 100755
--- a/shell-scripts/kakup
+++ b/shell-scripts/kakup
@@ -6,18 +6,19 @@ session-or-client() {
return
fi
pushd $project
- export name=${PWD#$HOME/}
- export name=${name//\//-}
- export name=${name#-}
- export server=kaks@$name
- export client=kakc@$name
+ name=${PWD#$HOME/}
+ name=${name//\//-}
+ name=${name#-}
+ server=kaks@$name
+ client=kakc@$name
+ TMUX_ENV="-e KAK_SERVER=$server -e KAK_CLIENT=$client"
tmux has-session -t $server || {
- tmux new -d -s $server -n $server bash -c '[[ -f .envrc ]] && eval "$(direnv export bash)"; { kak -s '$name' -d & }; tmux wait -S '$name'; wait'
+ tmux new $TMUX_ENV -d -s $server -n $server bash -c '[[ -f .envrc ]] && eval "$(direnv export bash)"; { kak -s '$name' -d & }; tmux wait -S '$name'; wait'
tmux wait "$name"
}
if [[ -z $TMUX ]]; then
- tmux has-session -t $client || tmux new -d -s $client -n $client kak -c $name
+ tmux has-session -t $client || tmux new $TMUX_ENV -d -s $client -n $client kak -c $name
else
tmux new-window -n $client kak -c $name
fi
diff --git a/shell-scripts/sb-clock b/shell-scripts/sb-clock
index d32f787..ba9e43d 100644
--- a/shell-scripts/sb-clock
+++ b/shell-scripts/sb-clock
@@ -19,7 +19,7 @@ case "$clock" in
esac
case $BUTTON in
- 1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s|..27m|</span></b>|")" && notify-send "Appointments" "$(calcurse -d3)" ;;
+ 1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"cyan\">/;s|..0m|</span></b>|")" && notify-send "Appointments" "$(calcurse -d3)" ;;
2) setsid -f "$TERMINAL" -e calcurse ;;
3) notify-send "📅 Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\`
- Middle click opens calcurse if installed" ;;