feat(heimdall): add basic setup for a server.
This commit is contained in:
parent
e58406b13a
commit
564178ff24
6 changed files with 180 additions and 28 deletions
5
modules/servers/general/default.nix
Normal file
5
modules/servers/general/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./openssh.nix
|
||||
];
|
||||
}
|
23
modules/servers/general/openssh.nix
Normal file
23
modules/servers/general/openssh.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{...}: {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
AllowUsers = ["root"];
|
||||
X11Forwarding = false;
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
extraConfig = ''
|
||||
PubkeyAuthentication yes
|
||||
PermitEmptyPasswords no
|
||||
|
||||
AddressFamily inet
|
||||
MaxAuthTries 3
|
||||
'';
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBJLduAXHWJiglmfRfkBGKffzVWkJP6porxIzw6+Zz3W crony@cronyakatsuki.xyz"
|
||||
];
|
||||
|
||||
services.fail2ban.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue