nix/nixos/containers/default.nix

49 lines
1.2 KiB
Nix
Raw Normal View History

2024-04-08 11:23:23 +09:00
{ ip, stateVersion, hostname, ... }: {
2024-03-21 20:27:53 +09:00
imports = [
2024-03-21 18:51:41 +09:00
./${hostname}
2024-04-07 08:42:00 +09:00
# Modules
2024-03-21 18:51:41 +09:00
../common/modules/nixos.nix
2024-04-07 08:42:00 +09:00
../common/modules/networking.nix
2024-03-30 15:27:21 +09:00
# Services
../common/services/promtail.nix
../common/services/telegraf.nix
../common/services/openssh.nix
2024-04-07 21:05:15 +09:00
../common/services/gnupg-agent.nix
../common/services/tailscale.nix
2024-03-21 18:51:41 +09:00
];
2024-03-30 15:27:21 +09:00
networking = {
defaultGateway = {
address = "192.168.2.1";
interface = "eth0";
};
interfaces = {
eth0.ipv4.addresses = [{
address = "192.168.2.${ip}";
prefixLength = 24;
}];
};
2024-04-07 08:42:00 +09:00
};
time.timeZone = "Asia/Tokyo";
2024-03-30 15:27:21 +09:00
boot.isContainer = true;
system.stateVersion = stateVersion;
networking.hostName = hostname;
programs.fish.enable = true;
2024-06-27 17:28:29 +09:00
2024-04-07 21:05:15 +09:00
# 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";
};
2024-03-21 18:51:41 +09:00
}