nixin-krops/config/arachnide/network-configuration.nix

68 lines
1.6 KiB
Nix
Raw Normal View History

# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
#virtualisation.writableStore = true;
#virtualisation.additionalPaths = [ pkgs.stdenv ];
networking = {
hostName = "arachnide";
useDHCP = false;
defaultGateway = "192.168.36.1";
nat = {
enable = true;
#internalInterfaces = ["vb-+"];
internalIPs = ["10.10.10.0/24"];
externalInterface = "enp1s0";
# Lazy IPv6 connectivity for the containers
#enableIPv6 = true;
};
# bridge for containers
bridges = {
"br0" = {
#interfaces = [ "enp4s0" ];
interfaces = [ ];
};
};
interfaces = {
# primary network interface, connected to WAN through a router
enp1s0 = {
useDHCP = false;
ipv4.addresses = [ {
address = "192.168.36.9";
prefixLength = 24;
} ];
};
# secondary network interface connected to a private local network
enp3s0 = {
useDHCP = false;
ipv4.addresses = [ {
address = "10.0.0.1";
prefixLength = 24;
} ];
};
# interface for containers virtual network
br0 = {
useDHCP = false;
ipv4.addresses = [ {
address = "10.10.10.1";
prefixLength = 24;
} ];
#ipv6.addresses = [
# {
# address = hostIp6;
# prefixLength = 7;
# }
#];
};
};
};
}