diff --git a/hosts/genepi/persistence.nix b/hosts/genepi/persistence.nix index b0010bf..c0651d9 100644 --- a/hosts/genepi/persistence.nix +++ b/hosts/genepi/persistence.nix @@ -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 = [ ]; diff --git a/hosts/genepi/taskchampion.nix b/hosts/genepi/taskchampion.nix index 5108dcd..b06dbc5 100644 --- a/hosts/genepi/taskchampion.nix +++ b/hosts/genepi/taskchampion.nix @@ -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}";