anchor.diff:          ExecStart = "${pkgs.nodejs-slim}/bin/node streaming";
           Restart = "always";
           RestartSec = 20;
  -        User = cfg.user;
  -        Group = cfg.group;
  +        EnvironmentFile = "/var/lib/mastodon/.secrets_env";
           WorkingDirectory = cfg.package;
  -        EnvironmentFile = "/var/lib/mastodon/.secrets_env";
  -        PrivateTmp = true;
  -        LogsDirectory = "mastodon";
  -        StateDirectory = "mastodon";
           # Runtime directory and mode
           RuntimeDirectory = "mastodon-streaming";
           RuntimeDirectoryMode = "0750";
  -      };
  +      } // cfgService;
       };
   
       systemd.services.mastodon-web = {
  
positive.code:       environment = env;
        serviceConfig = {
          Type = "oneshot";
          User = cfg.user;
          Group = cfg.group;
          WorkingDirectory = cfg.package;
          LogsDirectory = "mastodon";
          StateDirectory = "mastodon";
        };
        after = [ "network.target" ];
        wantedBy = [ "multi-user.target" ];
      };
  
negative.code:   // (if cfg.smtp.authenticate then { SMTP_LOGIN  = cfg.smtp.user; } else {})
    // cfg.extraConfig;
  
    cfgService = {
      # User and group
      User = cfg.user;
      Group = cfg.group;
      # State directory and mode
      StateDirectory = "mastodon";
      StateDirectoryMode = "0750";
      # Logs directory and mode
      LogsDirectory = "mastodon";
      LogsDirectoryMode = "0750";
      # Access write directories
      UMask = "0027";
      # Sandboxing
      PrivateTmp = true;
    };
  
    envFile = pkgs.writeText "mastodon.env" (lib.concatMapStrings (s: s + "\n") (
      (lib.concatLists (lib.mapAttrsToList (name: value:
        if value != null then [
  