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.

Changed files
+8 -1
nixos
+7 -1
nixos/modules/services/misc/taskchampion-sync-server.nix
···
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;
···
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} \
+1
nixos/tests/taskchampion-sync-server.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 =