nixos/taskchampion-sync-server: add host option, fix ExecStart

fixes the command line arguments for taskchampion-sync-server, also adding a new `host` option. fixes the corresponding test as well.
This commit is contained in:
municorn 2025-04-05 22:07:57 -06:00
parent a5a9e638d2
commit badd9d1a70
No known key found for this signature in database
GPG key ID: 4B21310A52B15162
2 changed files with 8 additions and 1 deletions

View file

@ -22,6 +22,12 @@ in
type = types.str;
default = "taskchampion";
};
host = lib.mkOption {
description = "Host address on which to serve";
type = types.str;
default = "127.0.0.1";
example = "0.0.0.0";
};
port = lib.mkOption {
description = "Port on which to serve";
type = types.port;
@ -79,7 +85,7 @@ in
DynamicUser = false;
ExecStart = ''
${lib.getExe cfg.package} \
--port ${builtins.toString cfg.port} \
--listen "${cfg.host}:${builtins.toString cfg.port}" \
--data-dir ${cfg.dataDir} \
--snapshot-versions ${builtins.toString cfg.snapshot.versions} \
--snapshot-days ${builtins.toString cfg.snapshot.days} \

View file

@ -6,6 +6,7 @@ import ./make-test-python.nix (
nodes = {
server = {
services.taskchampion-sync-server.enable = true;
services.taskchampion-sync-server.host = "0.0.0.0";
services.taskchampion-sync-server.openFirewall = true;
};
client =