diff --git a/modules/users/overseer/services/trilium.nix b/modules/users/overseer/services/trilium.nix index 4e35a5b..586afc9 100644 --- a/modules/users/overseer/services/trilium.nix +++ b/modules/users/overseer/services/trilium.nix @@ -5,22 +5,37 @@ ... }: lib.mkIf config.user.overseer.enable { - services.trilium-server = { - enable = true; - package = pkgs.trilium-next-server; - instanceName = "WanderingCrow"; - port = 8090; - }; + services = { + restic.backups.notes = { + user = "root"; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + }; + paths = [ + "/var/lib/trilium/backup" + ]; + repositoryFile = config.sops.secrets."restic/url".path; + passwordFile = config.sops.secrets."restic/key".path; + }; - services.nginx = { - enable = true; - recommendedProxySettings = true; - virtualHosts = { - "notes.wanderingcrow.net" = { - forceSSL = true; - useACMEHost = "notes.wanderingcrow.net"; - locations."/" = { - proxyPass = "http://127.0.0.1:8090"; + trilium-server = { + enable = true; + package = pkgs.trilium-next-server; + instanceName = "WanderingCrow"; + port = 8090; + }; + + nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts = { + "notes.wanderingcrow.net" = { + forceSSL = true; + useACMEHost = "notes.wanderingcrow.net"; + locations."/" = { + proxyPass = "http://127.0.0.1:8090"; + }; }; }; };