From 14221b51e3339fe235edb08f18d24c4ef20b470f Mon Sep 17 00:00:00 2001 From: Romain Paquet Date: Sun, 2 Feb 2025 23:08:40 +0100 Subject: [PATCH] add taskchampion-sync-server on genepi --- hosts/genepi/default.nix | 1 + hosts/genepi/dns.nix | 1 + hosts/genepi/taskchampion.nix | 15 +++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 hosts/genepi/taskchampion.nix diff --git a/hosts/genepi/default.nix b/hosts/genepi/default.nix index 0aa876c..5a0c3ef 100644 --- a/hosts/genepi/default.nix +++ b/hosts/genepi/default.nix @@ -20,6 +20,7 @@ ./network.nix ./nginx.nix ./persistence.nix + ./taskchampion.nix inputs.home-manager.nixosModules.home-manager { diff --git a/hosts/genepi/dns.nix b/hosts/genepi/dns.nix index 6c06217..b136a93 100644 --- a/hosts/genepi/dns.nix +++ b/hosts/genepi/dns.nix @@ -7,6 +7,7 @@ let "grafana" "images" "rss" + "tw" ]; }; in diff --git a/hosts/genepi/taskchampion.nix b/hosts/genepi/taskchampion.nix new file mode 100644 index 0000000..5108dcd --- /dev/null +++ b/hosts/genepi/taskchampion.nix @@ -0,0 +1,15 @@ +{ config, ... }: +let + domain = "home.rpqt.fr"; + subdomain = "tw.${domain}"; +in +{ + services.taskchampion-sync-server.enable = true; + + services.nginx.virtualHosts.${subdomain} = { + forceSSL = true; + useACMEHost = "${domain}"; + locations."/".proxyPass = + "http://127.0.0.1:${toString config.services.taskchampion-sync-server.port}"; + }; +}