dots/hosts/server/configuration.nix
2025-12-10 20:22:33 +11:00

61 lines
1.1 KiB
Nix

{
# keep-sorted start
hostName,
userName,
util,
# keep-sorted end
...
}:
{
imports = [
# keep-sorted start
../../modules/nixos/default.nix
./hardware-configuration.nix
# keep-sorted end
]
++ (util.toImports ../../modules/nixos/features [
# keep-sorted start
"borgmatic"
"intel-gpu"
# keep-sorted end
])
++ (util.toImports ../../modules/nixos/bundles [
"server"
]);
networking.hostName = "${hostName}";
# hardened openssh
services.openssh = {
allowSFTP = false;
extraConfig = ''
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
AuthenticationMethods publickey
'';
settings = {
KbdInteractiveAuthentication = false;
PasswordAuthentication = false;
};
};
system.stateVersion = "24.11";
users = {
groups.${userName} = { };
users.${userName} = {
extraGroups = [
# keep-sorted start
"docker"
"wheel"
# keep-sorted end
];
home = "/home/srv";
isNormalUser = true;
};
};
virtualisation.docker.enable = true;
}