mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(taskchampion): sync service
This commit is contained in:
parent
e9f297d51c
commit
e07f689dec
6 changed files with 64 additions and 0 deletions
23
nixos/taskchampion.nix
Normal file
23
nixos/taskchampion.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
cfg = config.services.taskchampion-sync-server;
|
||||
in {
|
||||
services.taskchampion-sync-server = {
|
||||
enable = mkDefault true;
|
||||
};
|
||||
users = mkIf (cfg.enable && cfg.user == "taskchampion") {
|
||||
users.taskchampion.uid = 917;
|
||||
groups.taskchampion.gid = config.users.users.taskchampion.uid;
|
||||
};
|
||||
systemd.services.taskchampion-sync-server = mkIf cfg.enable {
|
||||
confinement.enable = true;
|
||||
gensokyo-zone.sharedMounts.taskchampion.path = mkDefault cfg.dataDir;
|
||||
};
|
||||
networking.firewall.interfaces.lan = mkIf cfg.enable {
|
||||
allowedTCPPorts = [cfg.port];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue