feat: ooga booga my name sysadmin

This commit is contained in:
Teesh 2026-02-08 22:57:13 +02:00
parent 82731f059d
commit 3324013290
3 changed files with 26 additions and 2 deletions

View file

@ -0,0 +1,11 @@
{...}: {
flake.modules.nixos.server = {
services.fail2ban.enable = true;
services.fail2ban.jails = {
sshd = {
enabled = true;
filter = "sshd";
};
};
};
}

View file

@ -1,5 +1,17 @@
{...}: { {config, ...}: {
flake.modules.nixos.server = { flake.modules.nixos.server = {
services.openssh.enable = true; services.openssh = {
enable = true;
settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
};
};
users.users.${config.flake.meta.user.name} = {
openssh.authorizedKeys.keys = [
config.flake.meta.user.ssh_key
];
};
}; };
} }

View file

@ -3,6 +3,7 @@
name = "teesh"; name = "teesh";
email = "ilaylevy611@gmail.com"; email = "ilaylevy611@gmail.com";
face = ./assets/face.png; face = ./assets/face.png;
ssh_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICVaMnH7XOxnx+/hvO65gyi4Gx4449hTWxuXKXHokmh+ teesh@taki";
}; };
flake.meta.git.name = "teesh3rt"; flake.meta.git.name = "teesh3rt";