]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/webapps/mastodon.nix
Remove some activationScript and move them to preStart scripts
[perso/Immae/Config/Nix.git] / modules / webapps / mastodon.nix
index f8fbcbaf4e2bec0045297d25a25d2b8c870168cd..6255de91a708be894751ce298c4e67391abbaac5 100644 (file)
@@ -163,6 +163,7 @@ in
       path = [ cfg.workdir.gems cfg.workdir.gems.ruby pkgs.file ];
 
       preStart = ''
+        install -m 0755 -d ${cfg.dataDir}/tmp/cache
         ./bin/bundle exec rails db:migrate
       '';
 
@@ -218,12 +219,5 @@ in
       unitConfig.RequiresMountsFor = cfg.dataDir;
     };
 
-    system.activationScripts.mastodon = {
-      deps = [ "users" ];
-      text = ''
-      install -m 0755 -o ${cfg.user} -g ${cfg.group} -d ${cfg.dataDir}/tmp/cache
-      '';
-    };
-
   };
 }