diff --git a/nixos/modules/services/networking/coturn.nix b/nixos/modules/services/networking/coturn.nix index 2c89c3a12fb5..044d3ba0b791 100644 --- a/nixos/modules/services/networking/coturn.nix +++ b/nixos/modules/services/networking/coturn.nix @@ -363,7 +363,7 @@ in chmod 640 ${runConfig} ''; serviceConfig = rec { - Type = "simple"; + Type = "notify"; ExecStart = utils.escapeSystemdExecArgs [ (lib.getExe' pkgs.coturn "turnserver") "-c" @@ -413,6 +413,7 @@ in [ "AF_INET" "AF_INET6" + "AF_UNIX" ] ++ lib.optionals (cfg.listening-ips == [ ]) [ # only used for interface discovery when no listening ips are configured diff --git a/pkgs/by-name/co/coturn/package.nix b/pkgs/by-name/co/coturn/package.nix index d0eca5422fa1..9bd5ea132869 100644 --- a/pkgs/by-name/co/coturn/package.nix +++ b/pkgs/by-name/co/coturn/package.nix @@ -9,6 +9,7 @@ libmicrohttpd, sqlite, nixosTests, + systemdMinimal, }: stdenv.mkDerivation rec { @@ -26,13 +27,17 @@ stdenv.mkDerivation rec { pkg-config ]; - buildInputs = [ - openssl - (libevent.override { inherit openssl; }) - libprom - libmicrohttpd - sqlite.dev - ]; + buildInputs = + [ + openssl + (libevent.override { inherit openssl; }) + libprom + libmicrohttpd + sqlite.dev + ] + ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform systemdMinimal) [ + systemdMinimal + ]; patches = [ ./pure-configure.patch