32 lines
792 B
Nix
32 lines
792 B
Nix
{ stateVersion, hostname, username, ... }: {
|
|
imports = [
|
|
./${hostname}
|
|
../users/${username}
|
|
../common/modules/nixos.nix
|
|
# ../common/modules/networking.nix
|
|
# Services
|
|
../common/services/promtail.nix
|
|
../common/services/telegraf.nix
|
|
../common/services/openssh.nix
|
|
];
|
|
|
|
boot.isContainer = true;
|
|
system.stateVersion = stateVersion;
|
|
networking.hostName = "${hostname}";
|
|
|
|
# Set up the secrets file:
|
|
sops.secrets."tailscale_key" = {
|
|
owner = "root";
|
|
sopsFile = ../../secrets/containers/${hostname}.yaml;
|
|
restartUnits = [
|
|
"tailscaled.service"
|
|
"tailscaled-autoconnect.service"
|
|
];
|
|
};
|
|
|
|
services.tailscale = {
|
|
enable = true;
|
|
authKeyFile = "/run/secrets/tailscale_key";
|
|
interfaceName = "userspace-networking";
|
|
};
|
|
}
|