refactor: simplify hosts files

This commit is contained in:
2026-01-17 19:37:05 +01:00
parent 35fd4e61e2
commit bb6a380599
6 changed files with 61 additions and 85 deletions

View File

@@ -9,13 +9,21 @@
# Also see <https://wiki.nixos.org/wiki/Install_NixOS_on_Hetzner_Cloud>
let
username = "username";
hostName = "hecuba";
in
{
imports = [
./hard.nix
../../modules/common
./hard.nix
../../modules/ssh/hardened-openssh.nix
];
networking.hostName = hostName;
ssh.username = username;
ssh.authorizedHosts = [ "andromache" ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
@@ -41,16 +49,9 @@
};
};
ssh = {
username = "username";
authorizedHosts = [ "andromache" ];
};
security.sudo.wheelNeedsPassword = false;
networking = {
firewall.enable = true;
};
networking.firewall.enable = true;
environment.systemPackages = with pkgs; [
vim
@@ -66,6 +67,4 @@
enable = true;
harden = true;
};
networking.hostName = "hecuba";
}