move taskchampion persistence to its own module

This commit is contained in:
2025-02-11 20:42:50 +01:00
parent c4f857b635
commit 662a7f7b9f
2 changed files with 5 additions and 3 deletions

View File

@@ -22,8 +22,6 @@
"/etc/ssh/ssh_host_ed25519_key.pub"
# tailscale
"/var/lib/tailscale/tailscaled.state"
# taskchampion
"/var/lib/taskchampion-sync-server/taskchampion-sync-server.sqlite3"
];
users.rpqt = {
directories = [ ];

View File

@@ -1,11 +1,15 @@
{ config, ... }:
{ config, lib, ... }:
let
domain = "home.rpqt.fr";
subdomain = "tw.${domain}";
hasImpermanence = config.environment.persistence."/persist".enable;
in
{
services.taskchampion-sync-server.enable = true;
services.taskchampion-sync-server.dataDir =
(lib.optionalString hasImpermanence "/persist") + "/var/lib/taskchampion-sync-server";
services.nginx.virtualHosts.${subdomain} = {
forceSSL = true;
useACMEHost = "${domain}";