nixin-krops/config/grille-pain/network-configuration.nix

60 lines
1.3 KiB
Nix
Raw Normal View History

2024-12-25 17:24:33 +00:00
# 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 = "grille-pain";
useDHCP = false;
defaultGateway = "192.168.36.1";
nat = {
enable = true;
#internalInterfaces = ["vb-+"];
internalIPs = ["10.10.7.0/24"];
externalInterface = "end0";
2024-12-25 17:24:33 +00:00
# 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
end0 = {
useDHCP = false;
ipv4.addresses = [ {
address = "192.168.36.15";
prefixLength = 24;
} ];
};
# interface for containers virtual network
br0 = {
useDHCP = false;
ipv4.addresses = [ {
address = "10.10.7.1";
2024-12-25 17:24:33 +00:00
prefixLength = 24;
} ];
#ipv6.addresses = [
# {
# address = hostIp6;
# prefixLength = 7;
# }
#];
};
};
};
}