mcpo: add port option
All checks were successful
Build tests / build-hosts (pull_request) Successful in 23s
Flake check / flake-check (pull_request) Successful in 23s

This commit is contained in:
sid 2026-05-18 18:41:07 +02:00
parent 529ca4d572
commit 2323c97d89

View file

@ -28,6 +28,12 @@ in
default = null; default = null;
}; };
port = mkOption {
type = types.port;
default = 8000;
description = "Port on which the mcpo service should listen.";
};
user = mkOption { user = mkOption {
type = types.str; type = types.str;
description = "The user the mcpo service will run as."; description = "The user the mcpo service will run as.";
@ -100,7 +106,7 @@ in
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${getExe cfg.package} --config ${configFile}"; ExecStart = "${getExe cfg.package} --port ${cfg.port} --config ${configFile}";
Restart = "on-failure"; Restart = "on-failure";
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;