nix/nixos/containers/default.nix
2025-02-23 20:37:48 -08:00

47 lines
1.2 KiB
Nix

{ host, ip, hostname, ... }: {
imports = [
./${hostname}
# Modules
../common/modules/nixos.nix
../common/modules/networking.nix
# Services
../common/services/promtail.nix
../common/services/telegraf.nix
../common/services/openssh.nix
../common/services/gnupg-agent.nix
../common/services/tailscale.nix
];
networking = {
defaultGateway = {
address = "192.168.2.1";
interface = "eth0";
};
interfaces = {
eth0.ipv4.addresses = [{
address = "192.168.2.${ip}";
prefixLength = 24;
}];
};
};
system.stateVersion = "23.11";
# NOTE: Set so I can have copies of the rdesktop container on each host.
networking.hostName = "${hostname}-${host}";
programs.fish.enable = true;
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
}