From c78f79075e3f17d1ffc7e402297dce9ed9ef3eb2 Mon Sep 17 00:00:00 2001 From: kat Date: Fri, 7 Oct 2022 10:52:20 -0700 Subject: [PATCH] feat: oracle fix kw/nixfiles --- hardware/oracle/common.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hardware/oracle/common.nix b/hardware/oracle/common.nix index 77232b9a..be27bb88 100644 --- a/hardware/oracle/common.nix +++ b/hardware/oracle/common.nix @@ -87,18 +87,18 @@ in ipv4 = lib.mkOrder 1000 (tf.resources.${config.networking.hostName}.getAttr "public_ip"); ipv6 = let prefix = lib.head (lib.splitString "/" (oci-root.resources.oci_kw_subnet.importAttr "ipv6cidr_block")); - in assert lib.hasSuffix "::" prefix; prefix + toString config.kw.oci.network.publicV6; + in assert lib.hasSuffix "::" prefix; prefix + toString config.nixfiles.oci.network.publicV6; ip = hostname: class: if hostname != config.networking.hostName then if class == 6 then let prefix = lib.head (lib.splitString "/" (oci-root.resources.oci_kw_subnet.importAttr "ipv6cidr_block")); - in assert lib.hasSuffix "::" prefix; prefix + toString config.kw.oci.network.publicV6 + in assert lib.hasSuffix "::" prefix; prefix + toString config.nixfiles.oci.network.publicV6 else if class == 4 then tf.resources.${config.networking.hostName}.importAttr "public_ip" else throw "${config.networking.hostName}: IP for ${hostname} of ${toString class} is invalid." else if class == 6 then let prefix = lib.head (lib.splitString "/" (oci-root.resources.oci_kw_subnet.importAttr "ipv6cidr_block")); - in assert lib.hasSuffix "::" prefix; prefix + toString config.kw.oci.network.publicV6 + in assert lib.hasSuffix "::" prefix; prefix + toString config.nixfiles.oci.network.publicV6 else if class == 4 then tf.resources.${config.networking.hostName}.getAttr "public_ip" else throw "${config.networking.hostName}: IP for ${hostname} of ${toString class} is invalid."; @@ -109,7 +109,7 @@ in ]; }; - services.cockroachdb.locality = "provider=oracle,region=${oci-root.outputs.oci_region.import},ad=${cfg.ad},host=${config.networking.hostName}"; + services.cockroachdb.locality = "provider=oracle,region=${tf.providers.oci.inputs.region},ad=${toString cfg.ad},host=${config.networking.hostName}"; deploy.tf = let