From 3d78628d2f84ac467ac738d3442eaef8113a0fe0 Mon Sep 17 00:00:00 2001 From: niten Date: Tue, 4 Jun 2024 10:01:15 -0700 Subject: [PATCH] Oh, does host/localAddress work? --- paris-container.nix | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/paris-container.nix b/paris-container.nix index 8194ed5..572962d 100644 --- a/paris-container.nix +++ b/paris-container.nix @@ -161,27 +161,17 @@ in { target-file = "/run/paris/openssh/${keypairFilename keypair}"; }) parisKeypairs)); - networking = { - interfaces = { - auth0 = { - virtual = true; - ipv4.addresses = [{ - address = "172.16.128.1"; - prefixLength = 24; - }]; - }; - }; - }; - virtualisation.oci-containers.containers.paris-ldap-proxy = { image = cfg.ldap.image; autoStart = true; - ports = [ "172.16.128.1:${toString cfg.ldap.port}:389" ]; + ports = [ "172.16.31.1:${toString cfg.ldap.port}:389" ]; environmentFiles = [ hostSecrets.parisLdapEnv.target-file ]; }; containers.paris = { macvlans = [ cfg.networking.interface "auth0" ]; + hostAddress = "172.16.31.1"; + localAddress = "172.16.31.2"; bindMounts = { "/home" = { hostPath = "${cfg.state-directory}/home"; @@ -244,7 +234,7 @@ in { auth_provider = "ldap"; access_provider = "ldap"; - ldap_uri = "ldap://172.16.128.1:${toString cfg.ldap.port}"; + ldap_uri = "ldap://172.16.31.1:${toString cfg.ldap.port}"; ldap_schema = "rfc2307bis"; ldap_search_base = cfg.ldap.base;