summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-10-08 01:04:01 +0300
committerAzat Bahawi <azat@bahawi.net>2022-10-08 01:04:01 +0300
commita0a3dcde99c4a8aa19b23ead79c08eedca30d002 (patch)
tree06387d2676fa1656df7db976f3601d00b08bd1a8 /lib
parent6320d4225b087f096268cd99eee2ba3ecfa989a0 (diff)
2022-10-08
Diffstat (limited to 'lib')
-rw-r--r--lib/my.nix41
1 files changed, 28 insertions, 13 deletions
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";