feat: wip generic hosts
Some checks failed
/ check (push) Failing after 40s

This commit is contained in:
Daniel Flanagan 2025-02-19 12:09:14 -06:00
parent 1e150588d6
commit 873677088d
2 changed files with 63 additions and 0 deletions

View file

@ -11,5 +11,8 @@ in
router = stableHost ./router.nix { }; router = stableHost ./router.nix { };
bigtower = stableHost ./bigtower.nix { }; bigtower = stableHost ./bigtower.nix { };
rascal = stableHost ./rascal.nix { }; rascal = stableHost ./rascal.nix { };
generic-headless = stableHost ./generic-headless.nix { };
generic = stableHost ./generic.nix { };
# arm-dragon = host ./dragon.nix { system = "aarch64-linux"; }; # arm-dragon = host ./dragon.nix { system = "aarch64-linux"; };
} }

View file

@ -0,0 +1,60 @@
{
hardware,
config,
...
}:
{
system.stateVersion = "24.05";
networking.hostName = "lyte-generic-headless";
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"ehci_pci"
"usbhid"
"uas"
"sd_mod"
];
imports = with hardware; [
common-cpu-amd
common-pc-ssd
];
users.groups.beefcake = { };
users.users = {
beefcake = {
isSystemUser = true;
createHome = true;
home = "/storage/backups/beefcake";
group = "beefcake";
extraGroups = [ "sftponly" ];
openssh.authorizedKeys.keys = config.users.users.daniel.openssh.authorizedKeys.keys ++ [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7HrojwoyHED+A/FzRjYmIL0hzofwBd9IYHH6yV0oPO root@beefcake"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAOEI82VdbyR1RYqSnFtlffHBtHFdXO0v9RmQH7GkfXo restic@beefcake"
];
};
};
services.openssh.extraConfig = ''
Match Group sftponly
ChrootDirectory /storage/backups/%u
ForceCommand internal-sftp
AllowTcpForwarding no
'';
networking = {
wifi.enable = true;
firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [ 22 ];
};
};
services.tailscale.useRoutingFeatures = "server";
home-manager.users.daniel = {
lyte.shell.enable = true;
};
}