summaryrefslogtreecommitdiff
path: root/programs/ssh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'programs/ssh/default.nix')
-rw-r--r--programs/ssh/default.nix45
1 files changed, 0 insertions, 45 deletions
diff --git a/programs/ssh/default.nix b/programs/ssh/default.nix
deleted file mode 100644
index b6ecb1d..0000000
--- a/programs/ssh/default.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- config,
- lib,
- ...
-}: {
- # ssh config
- home-manager.users.${config.user} = {
- programs.ssh = {
- enable = true;
- extraConfig = lib.fileContents ./config;
- };
- };
-
- # sshd
- services.openssh = {
- enable = true;
- ports = [22];
- settings = {
- PasswordAuthentication = false;
- KbdInteractiveAuthentication = false;
- UseDns = true;
- X11Forwarding = false;
- PermitRootLogin = "no";
- };
- };
-
- # allow ssh port
- networking.firewall.allowedTCPPorts = [22];
-
- # ban evil
- services.fail2ban = {
- enable = true;
- ignoreIP = [
- # freyanet
- "10.0.0.0/14"
- ];
- };
-
- # add authorized keys
- users.users.${config.user} = {
- openssh.authorizedKeys.keyFiles = [
- ../../files/keys/ssh.pub
- ];
- };
-}