]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/tools/mastodon/default.nix
Remove duply-backup
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / mastodon / default.nix
index cea8710451db0e1ac6ccd65a4d2f7b394f327221..173a4b841b14e649dd802ad188322950e25dcb7f 100644 (file)
@@ -1,7 +1,7 @@
 { lib, pkgs, config,  ... }:
 let
   env = config.myEnv.tools.mastodon;
-  root = "/run/current-system/webapps/tools_mastodon";
+  root = "${mcfg.workdir}/public/";
   cfg = config.myServices.websites.tools.mastodon;
   mcfg = config.services.mastodon;
 in {
@@ -10,11 +10,7 @@ in {
   };
 
   config = lib.mkIf cfg.enable {
-    services.duplyBackup.profiles.mastodon = {
-      rootDir = mcfg.dataDir;
-    };
-    secrets.keys = [{
-      dest = "webapps/tools-mastodon";
+    secrets.keys."webapps/tools-mastodon" = {
       user = "mastodon";
       group = "mastodon";
       permissions = "0400";
@@ -59,7 +55,7 @@ in {
         LDAP_UID="uid"
         LDAP_SEARCH_FILTER="${env.ldap.filter}"
       '';
-    }];
+    };
     services.mastodon = {
       enable = true;
       configFile = config.secrets.fullPaths."webapps/tools-mastodon";
@@ -83,10 +79,6 @@ in {
     services.websites.env.tools.modules = [
       "headers" "proxy" "proxy_wstunnel" "proxy_http"
     ];
-    system.extraSystemBuilderCmds = ''
-      mkdir -p $out/webapps
-      ln -s ${mcfg.workdir}/public/ $out/webapps/tools_mastodon
-      '';
     services.websites.env.tools.vhostConfs.mastodon = {
       certName    = "eldiron";
       addToCerts  = true;