petersweb-infra/nixos/hetzner.nix
2026-05-04 10:54:02 -07:00

47 lines
973 B
Nix

{modulesPath, ...}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
];
# Fixes iotop
boot.kernel.sysctl = {"kernel.task_delayacct" = 1;};
boot.loader.grub = {
enable = true;
device = "/dev/sda";
efiSupport = false;
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/aaf104ce-4851-40d9-aeea-bebb5684f8c4";
fsType = "ext4";
};
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
settings.PermitRootLogin = "yes";
settings.AllowUsers = [ "root" ];
extraConfig = ''
PrintLastLog no
'';
hostKeys = [
{
bits = 4096;
path = "/etc/ssh/ssh_host_rsa_key";
type = "rsa";
}
{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
# For secrets
{
path = "/root/.ssh/id_rsa_nix";
type = "ed25519";
}
];
};
}