Unverified Commit 6b1773cc authored by Vladislav Grechannik's avatar Vladislav Grechannik
Browse files

matrix-tuwunel: remove restriction on setting both address and unix_socket_path

parent fbe3d2fb
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ in
            description = ''
              Addresses (IPv4 or IPv6) to listen on for connections by the reverse proxy/tls terminator.
              If set to `null`, tuwunel will listen on IPv4 and IPv6 localhost.
              Must be `null` if `unix_socket_path` is set.
            '';
          };
          global.port = lib.mkOption {
@@ -167,14 +166,6 @@ in

  config = lib.mkIf cfg.enable {
    assertions = [
      {
        assertion = !(cfg.settings ? global.unix_socket_path) || !(cfg.settings ? global.address);
        message = ''
          In `services.matrix-tuwunel.settings.global`, `unix_socket_path` and `address` cannot be set at the
          same time.
          Leave one of the two options unset or explicitly set them to `null`.
        '';
      }
      {
        assertion = cfg.user != defaultUser -> config ? users.users.${cfg.user};
        message = "If `services.matrix-tuwunel.user` is changed, the configured user must already exist.";