From a0a3dcde99c4a8aa19b23ead79c08eedca30d002 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sat, 8 Oct 2022 01:04:01 +0300 Subject: 2022-10-08 --- lib/my.nix | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) (limited to 'lib/my.nix') diff --git a/lib/my.nix b/lib/my.nix index 6f744bc..05fd6e9 100644 --- a/lib/my.nix +++ b/lib/my.nix @@ -34,24 +34,34 @@ with lib; ipv4 = { address = mkOption { - description = "The machine's public IPv4 addresses."; + description = "The machine's public IPv4 address."; type = nullOr str; default = null; }; - gateway = mkOption { - description = "The machine's IPv4 gateway."; + prefixLength = mkOption { + description = "The machine's IPv4 prefix length."; + type = nullOr int; + default = null; + }; + gatewayAddress = mkOption { + description = "The machine's IPv4 gateway address."; type = nullOr str; default = null; }; }; ipv6 = { address = mkOption { - description = "The machine's public IPv6 addresses."; + description = "The machine's public IPv6 address."; type = nullOr str; default = null; }; - gateway = mkOption { - description = "The machine's IPv6 gateway."; + prefixLength = mkOption { + description = "The machine's IPv6 prefix length."; + type = nullOr int; + default = null; + }; + gatewayAddress = mkOption { + description = "The machine's IPv6 gateway address."; type = nullOr str; default = null; }; @@ -127,12 +137,14 @@ with lib; manwe = { isHeadless = true; ipv4 = { + gatewayAddress = "@IPV4_ADDRESS@"; address = "@IPV4_ADDRESS@"; - gateway = "@IPV4_ADDRESS@"; + prefixLength = 22; }; ipv6 = { + gatewayAddress = "@IPV6_ADDRESS@"; address = "@IPV6_ADDRESS@]"; - gateway = "@IPV6_ADDRESS@"; + prefixLength = 64; }; wireguard = { ipv4.address = "10.69.0.1"; @@ -161,29 +173,32 @@ with lib; varda = { isHeadless = true; ipv4 = { + gatewayAddress = "@IPV4_ADDRESS@"; address = "@IPV4_ADDRESS@"; - gateway = "@IPV4_ADDRESS@"; + prefixLength = 22; }; ipv6 = { + gatewayAddress = "@IPV6_ADDRESS@"; address = "@IPV6_ADDRESS@"; - gateway = "@IPV6_ADDRESS@"; + prefixLength = 64; }; wireguard = { ipv4.address = "10.69.1.1"; ipv6.address = "fd69::1:1"; publicKey = "@PUBLIC_KEY@"; }; - domains = with my.domain; ["minecraft.${shire}"]; }; yavanna = { isHeadless = true; ipv4 = { + gatewayAddress = "@IPV4_ADDRESS@"; address = "@IPV4_ADDRESS@"; - gateway = "@IPV4_ADDRESS@"; + prefixLength = 24; }; ipv6 = { + gatewayAddress = "@IPV6_ADDRESS@"; address = "@IPV6_ADDRESS@"; - gateway = "@IPV6_ADDRESS@"; + prefixLength = 128; }; wireguard = { ipv4.address = "10.69.1.2"; -- cgit v1.2.3