finish configuration for ssh

- iptables geoip whitelist for ssh
- NOPASSWD for efibootmgr, allowing easy reboot into windows from laptop/phone
- no fastfetch for remote shells
This commit is contained in:
greyweather committed 2026-07-16 23:01:20 +01:00
1 parent 63a645446d
commit 9a3530aa6a
14 files changed
+11896 -87

No files matched your search

+15 -1
View File
@@ -3,7 +3,21 @@
lib,
...
}: {
programs.zsh.initContent = lib.mkOrder 1500 "fastfetch";
programs.zsh.initContent = lib.mkOrder 1500 ''
SESSION_TYPE=local
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
SESSION_TYPE=remote/ssh
# many other tests omitted
else
case $(ps -o comm= -p "$PPID") in
sshd|*/sshd) SESSION_TYPE=remote/ssh;;
esac
fi
if [ $SESSION_TYPE != remote/ssh ]; then
fastfetch
fi
'';
programs.fastfetch = {
enable = true;