about summary refs log tree commit diff stats
path: root/modules/by-name/ta/taskchampion-sync/module.nix
blob: 579ea56ab108c7e0ddcc51f9cc09ff650729f7b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  config,
  lib,
  ...
}: let
  cfg = config.vhack.taskchampion-sync;
in {
  options.vhack.taskchampion-sync = {
    enable = lib.mkEnableOption "taskchampion-sync";
  };

  config = lib.mkIf cfg.enable {
    users = {
      users.taskchampion.uid = config.vhack.constants.ids.uids.taskchampion;
      groups.taskchampion.gid = config.vhack.constants.ids.uids.taskchampion;
    };

    services.taskchampion-sync-server = {
      enable = true;
      openFirewall = true;
    };
  };
}