feat: ooga booga my name sysadmin
This commit is contained in:
parent
82731f059d
commit
3324013290
3 changed files with 26 additions and 2 deletions
11
modules/server/fail2ban.nix
Normal file
11
modules/server/fail2ban.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{...}: {
|
||||||
|
flake.modules.nixos.server = {
|
||||||
|
services.fail2ban.enable = true;
|
||||||
|
services.fail2ban.jails = {
|
||||||
|
sshd = {
|
||||||
|
enabled = true;
|
||||||
|
filter = "sshd";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -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
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue