]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - virtual/modules/websites/tools/mastodon/default.nix
Remove use of environment variables
[perso/Immae/Config/Nix.git] / virtual / modules / websites / tools / mastodon / default.nix
index d25a072967cd4eb2efddffde0d360fc7c45472b0..98ab9be39f51d55361aeccc7dc1f4c079a3172cd 100644 (file)
@@ -1,7 +1,8 @@
-{ lib, pkgs, config, mylibs, ... }:
+{ lib, pkgs, config, myconfig, mylibs, ... }:
 let
   mastodon = pkgs.callPackage ./mastodon.nix {
-    inherit (mylibs) fetchedGithub checkEnv;
+    inherit (mylibs) fetchedGithub;
+    env = myconfig.env.tools.mastodon;
   };
 
   cfg = config.services.myWebsites.tools.mastodon;
@@ -11,8 +12,6 @@ in {
   };
 
   config = lib.mkIf cfg.enable {
-    # FIXME: Can we use dynamic users from systemd?
-    # nixos/modules/misc/ids.nix
     ids.uids.mastodon = 399;
     ids.gids.mastodon = 399;
 
@@ -96,7 +95,6 @@ in {
       unitConfig.RequiresMountsFor = mastodon.varDir;
     };
 
-    # FIXME: monitor jobs
     systemd.services.mastodon-sidekiq = {
       description = "Mastodon Sidekiq";
       wantedBy = [ "multi-user.target" ];
@@ -124,7 +122,6 @@ in {
       unitConfig.RequiresMountsFor = mastodon.varDir;
     };
 
-    # FIXME: initial sync
     system.activationScripts.mastodon = {
       deps = [ "users" ];
       text = ''
@@ -135,7 +132,6 @@ in {
 
     services.myWebsites.tools.modules = [
       "headers" "proxy" "proxy_wstunnel" "proxy_http" "proxy_balancer"
-      # FIXME: probably only one balancer method is needed:
       "lbmethod_byrequests" "lbmethod_bytraffic" "lbmethod_bybusyness" "lbmethod_heartbeat"
     ];
     security.acme.certs."eldiron".extraDomains."mastodon.immae.eu" = null;