From: Ismaƫl Bouya Date: Sat, 24 Feb 2024 11:05:51 +0000 (+0100) Subject: Add ipv6 configuration for zoldene X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=5141a78699924106c8f3d7359528176b1c3fdf7a;p=perso%2FImmae%2FConfig%2FNix.git Add ipv6 configuration for zoldene --- diff --git a/deploy/flake.lock b/deploy/flake.lock index 1b64653..d4fc017 100644 --- a/deploy/flake.lock +++ b/deploy/flake.lock @@ -2783,7 +2783,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-eMtBwFev8mR4UddJmG/pTlS2Xh4/LTckEpdiz3a2cOk=", + "narHash": "sha256-RMKq47gsekcw+bpRXj4Es8p3bBCNg4tmDqcg8PAbovs=", "path": "../flakes", "type": "path" }, @@ -3974,7 +3974,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-NjuGFIxBJ3hIxk2fnZeQOvWa+jDHbGsIRpKT5I+cRz4=", + "narHash": "sha256-ozjB87SNwkQLQH2nkkIQJqC3HoewYe1z1PoyiNGmtcM=", "path": "../systems/zoldene", "type": "path" }, diff --git a/flake.lock b/flake.lock index f082686..c8ffd7d 100644 --- a/flake.lock +++ b/flake.lock @@ -2664,7 +2664,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-eMtBwFev8mR4UddJmG/pTlS2Xh4/LTckEpdiz3a2cOk=", + "narHash": "sha256-RMKq47gsekcw+bpRXj4Es8p3bBCNg4tmDqcg8PAbovs=", "path": "./flakes", "type": "path" }, @@ -3990,7 +3990,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-NjuGFIxBJ3hIxk2fnZeQOvWa+jDHbGsIRpKT5I+cRz4=", + "narHash": "sha256-ozjB87SNwkQLQH2nkkIQJqC3HoewYe1z1PoyiNGmtcM=", "path": "../systems/zoldene", "type": "path" }, diff --git a/flakes/flake.lock b/flakes/flake.lock index 359762a..d6e655e 100644 --- a/flakes/flake.lock +++ b/flakes/flake.lock @@ -3895,7 +3895,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-NjuGFIxBJ3hIxk2fnZeQOvWa+jDHbGsIRpKT5I+cRz4=", + "narHash": "sha256-ozjB87SNwkQLQH2nkkIQJqC3HoewYe1z1PoyiNGmtcM=", "path": "../systems/zoldene", "type": "path" }, diff --git a/systems/zoldene/base.nix b/systems/zoldene/base.nix index 2751d63..fc0d68a 100644 --- a/systems/zoldene/base.nix +++ b/systems/zoldene/base.nix @@ -84,6 +84,19 @@ in firewall.allowedUDPPorts = [ 43484 ]; # needed for initrd proper network setup too useDHCP = lib.mkDefault true; + interfaces."enp0s31f6".ipv6.addresses = pkgs.lib.flatten (pkgs.lib.attrsets.mapAttrsToList + (n: ips: map (ip: { address = ip; prefixLength = (if n == "main" && ip == pkgs.lib.head ips.ip6 then 64 else 128); }) (ips.ip6 or [])) + config.hostEnv.ips); + defaultGateway6 = { + address = "fe80::1"; + interface = "enp0s31f6"; + }; + nameservers = [ + "185.12.64.1" + "185.12.64.2" + "2a01:4ff:ff00::add:1" + "2a01:4ff:ff00::add:2" + ]; wireguard.interfaces.wg0 = { generatePrivateKeyFile = true;