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

+7
View File
@@ -20,4 +20,11 @@
};
startWhenNeeded = true;
};
networking.firewall.extraCommands = ''
iptables -D INPUT -p tcp --dport 22 -m set ! --match-set geo-whitelist src -j DROP
${pkgs.ipset}/bin/ipset destroy geo-whitelist
${pkgs.ipset}/bin/ipset restore -file /home/grey/nixos/assets/geo-whitelist.ipset
iptables -I INPUT -p tcp --dport 22 -m set ! --match-set geo-whitelist src -j DROP
'';
}
+8
View File
@@ -27,10 +27,18 @@
command = "${pkgs.efibootmgr}/bin/efibootmgr";
options = [ "NOPASSWD" ];
}
{
command = "/run/current-system/sw/bin/efibootmgr";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.efibootmgr}/bin/efibootdump";
options = [ "NOPASSWD" ];
}
{
command = "${pkgs.efibootmgr}/sbin/efibootdump";
options = [ "NOPASSWD" ];
}
];
users = [ "grey" ];
}];