diff options
| author | Mel <einebeere@gmail.com> | 2024-11-13 21:31:32 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-11-13 21:31:32 +0100 |
| commit | 74977a5367666c3b39d1d9c3c80d9fc4f08305c1 (patch) | |
| tree | 0293f519428f41f1d893c6eae334e3e65b9967ad /machines/lapin/devices.nix | |
| parent | d39ae5050c81bb0cfea950ba57d32bc8c6304d37 (diff) | |
| download | network-74977a5367666c3b39d1d9c3c80d9fc4f08305c1.tar.zst network-74977a5367666c3b39d1d9c3c80d9fc4f08305c1.zip | |
Import old lapin configuration
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'machines/lapin/devices.nix')
| -rw-r--r-- | machines/lapin/devices.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/machines/lapin/devices.nix b/machines/lapin/devices.nix new file mode 100644 index 0000000..f7538a3 --- /dev/null +++ b/machines/lapin/devices.nix @@ -0,0 +1,46 @@ +{ lib, ... }: + +{ + # Boot! + boot.loader.systemd-boot.enable = true; + + networking = { + # Network configuration is managed with networkd. + useDHCP = false; + nameservers = [ + "1.1.1.1" "1.0.0.1" + "2606:4700:4700::1111" "2606:4700:4700::1001" + ]; + }; + + # Static IPv6 network configuration + # + soliciting of IPv4 via DHCP. + systemd.network.enable = true; + systemd.network.networks."10-wan" = { + name = "enp1s0"; + DHCP = "ipv4"; + address = [ "2a01:4f8:c012:9493::1" ]; + routes = [ { routeConfig.Gateway = "fe80::1"; } ]; + }; + + services.resolved = { + # LLMNR and MulticastDNS both give DNS timeouts. + # MDNS specifically for some reason gives Docker bridge interfaces it's scope, + # which means every DNS request waits for an answer... from every interface... + llmnr = "false"; + extraConfig = "MulticastDNS=no"; + dnssec = "false"; # DNSSEC breaks IPv6, for some reason :( + }; + + virtualisation.docker.daemon.settings = { + "experimental" = true; + "ipv6" = true; + "ip6tables" = true; + "fixed-cidr-v6" = "fc00:d0c:b1b1::/48"; + "bip" = "172.17.0.1/24"; + "default-address-pools" = [ + { base = "172.17.0.0/16"; size = 24; } + { base = "fc00:d0c::/32"; size = 48; } + ]; + }; +} |
