almost done hopefully
This commit is contained in:
parent
0b7cb500fc
commit
03c63c0722
11
flake.nix
11
flake.nix
|
@ -85,9 +85,10 @@
|
||||||
description = "The UDP port to host the server on";
|
description = "The UDP port to host the server on";
|
||||||
};
|
};
|
||||||
proximity = {
|
proximity = {
|
||||||
type = lib.types.attrs;
|
type = types.nullOr lib.types.attrs;
|
||||||
|
default = null;
|
||||||
port = lib.mkOption {
|
port = lib.mkOption {
|
||||||
type = lib.types.port;
|
type = types.nullOr lib.types.port;
|
||||||
example = 4433;
|
example = 4433;
|
||||||
description = "The UDP port to host the proximity chat server on";
|
description = "The UDP port to host the proximity chat server on";
|
||||||
};
|
};
|
||||||
|
@ -99,7 +100,7 @@
|
||||||
keyPath = lib.mkOption {
|
keyPath = lib.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
example = "cert.pem";
|
example = "cert.pem";
|
||||||
description = "The certificate used for encrypting the WebTransport stream";
|
description = "The private key used for encrypting the WebTransport stream";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -112,8 +113,8 @@
|
||||||
WorkingDirectory = "${self.packages.${system}.default}";
|
WorkingDirectory = "${self.packages.${system}.default}";
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = let
|
ExecStart = let
|
||||||
proxRes = 5;
|
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}'';
|
in ''${self.packages.${system}.default}/bin/smo-server -t ${toString tcpPort} -u ${toString udpPort} ${lib.strings.optionalString enableFaker "--enable-faker"}'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue