From 869f8d04c748ab0a83f270cad2bcdfe7ac8ce5b2 Mon Sep 17 00:00:00 2001 From: Aubrey Taylor Date: Sun, 22 Dec 2024 01:29:30 -0600 Subject: [PATCH] done now --- flake.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 7d62ec0..34aa641 100644 --- a/flake.nix +++ b/flake.nix @@ -32,7 +32,7 @@ nativeBuildInputs = with pkgs; [pkg-config cmake]; buildInputs = with pkgs; [ - openssl + openssl zlib-ng ] ++ lib.optionals stdenv.isDarwin [ @@ -84,11 +84,12 @@ default = 1027; description = "The UDP port to host the server on"; }; - proximity = { - type = types.nullOr lib.types.attrs; + proximity = lib.mkOption { + type = lib.types.nullOr lib.types.attrs; default = null; + } // { port = lib.mkOption { - type = types.nullOr lib.types.port; + type = lib.types.port; example = 4433; description = "The UDP port to host the proximity chat server on"; }; @@ -113,8 +114,8 @@ WorkingDirectory = "${self.packages.${system}.default}"; Type = "simple"; ExecStart = let - proxRes = if proximity == null then "-p ${proximity.port} --prox-cert ${proximity.certPath} --prox-key ${proximity.keyPath}" else ""; - in ''${self.packages.${system}.default}/bin/smo-server -t ${toString tcpPort} -u ${toString udpPort} ${lib.strings.optionalString enableFaker "--enable-faker"}''; + proxRes = if proximity != null then "-p ${toString proximity.port} --prox-cert ${proximity.certPath} --prox-key ${proximity.keyPath}" else ""; + in ''${self.packages.${system}.default}/bin/smo-server -t ${toString tcpPort} -u ${toString udpPort} ${proxRes} ${lib.strings.optionalString enableFaker "--enable-faker"}''; }; }; };