added for vps
This commit is contained in:
parent
15d0cb574b
commit
ffbf9e08f2
9 changed files with 314 additions and 21 deletions
28
hosts/server/security.nix
Normal file
28
hosts/server/security.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [8123];
|
||||
settings = {
|
||||
PermitRootLogin = "prohibit-password";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
../../.secrets/id_ed25519.pub
|
||||
];
|
||||
|
||||
users.users.admin = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "docker"];
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
../../.secrets/id_ed25519.pub
|
||||
];
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue