2024-03-21 10:51:41 +01:00
|
|
|
{ hostname, username, ... }: {
|
2024-03-21 12:27:53 +01:00
|
|
|
imports = [
|
2024-03-21 10:51:41 +01:00
|
|
|
./${hostname}
|
|
|
|
../users/${username}
|
|
|
|
../common/modules/nixos.nix
|
2024-03-25 03:53:39 +01:00
|
|
|
../common/modules/networking.nix
|
|
|
|
# Services
|
|
|
|
../common/services/promtail.nix
|
|
|
|
../common/services/telegraf.nix
|
|
|
|
../common/services/tailscale.nix
|
2024-03-21 10:51:41 +01:00
|
|
|
];
|
2024-03-25 03:53:39 +01:00
|
|
|
# Generic Tailscale configs are in /nixos/common/services/tailscale.nix
|
|
|
|
# Set up the secrets file:
|
|
|
|
sops.secrets."tailscale_key" = {
|
|
|
|
owner = "root";
|
|
|
|
sopsFile = ../../../secrets/containers/${hostname}.yaml;
|
|
|
|
restartUnits = [
|
|
|
|
"tailscaled.service"
|
|
|
|
"tailscaled-autoconnect.service"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
services.tailscale.authKeyFile = "/run/secrets/tailscale_key";
|
2024-03-21 12:27:53 +01:00
|
|
|
networking.hostName = "${hostname}";
|
2024-03-21 10:51:41 +01:00
|
|
|
}
|