1 import ./make-test-python.nix (
4 name = "taskchampion-sync-server";
8 services.taskchampion-sync-server.enable = true;
9 services.taskchampion-sync-server.openFirewall = true;
14 environment.systemPackages = [ pkgs.taskwarrior3 ];
20 cfg = nodes.server.services.taskchampion-sync-server;
21 port = builtins.toString cfg.port;
22 # Generated with uuidgen
23 uuid = "bf01376e-04a4-435a-9263-608567531af3";
24 password = "nixos-test";
27 # Explicitly start the VMs so that we don't accidentally start newServer
31 server.wait_for_unit("taskchampion-sync-server.service")
32 server.wait_for_open_port(${port})
34 # See man task-sync(5)
35 client.succeed("mkdir ~/.task")
36 client.succeed("touch ~/.taskrc")
37 client.succeed("echo sync.server.origin=http://server:${port} >> ~/.taskrc")
38 client.succeed("echo sync.server.client_id=${uuid} >> ~/.taskrc")
39 client.succeed("echo sync.encryption_secret=${password} >> ~/.taskrc")
40 client.succeed("task add hello world")
41 client.succeed("task sync")
43 # Useful for debugging
44 client.copy_from_vm("/root/.task", "client")
45 server.copy_from_vm("${cfg.dataDir}", "server")