infra/nix/os/devices/srv0.home-ch.stefanjunker.de/system.nix

64 lines
1.5 KiB
Nix
Raw Normal View History

2024-11-15 10:17:56 +01:00
_: {
# TASK: new device
networking.hostName = "srv0"; # Define your hostname.
# networking.domain = "home-ch.stefanjunker.de";
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [
# iperf3
5201
];
networking.firewall.logRefusedConnections = false;
networking.usePredictableInterfaceNames = false;
networking.dhcpcd = {
enable = true;
persistent = true;
};
networking.interfaces.eth0 = {
useDHCP = true;
# ipv6.addresses = [
# { address = "2a02:c207:3003:2387::1"; prefixLength = 64; }
# ];
};
# networking.defaultGateway6 = {
# address = "fe80::1";
# interface = "eth0";
# };
networking.nat = {
enable = true;
2024-11-15 10:17:56 +01:00
internalInterfaces = [ "ve-+" ];
externalInterface = "eth0";
};
# Kubernetes
# services.kubernetes.roles = ["master" "node"];
# virtualization
2024-11-15 10:17:56 +01:00
virtualisation = {
docker.enable = true;
};
2024-11-15 10:17:56 +01:00
nix.gc = {
automatic = true;
};
2022-03-20 16:40:47 +01:00
networking.useHostResolvConf = false;
2024-11-15 10:17:56 +01:00
services.resolved = {
enable = true;
};
2024-11-15 10:17:56 +01:00
containers = { };
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.03"; # Did you read the comment?
}