Skip to content

Commit

Permalink
nixos/mastodon: update service configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Izorkin committed Aug 28, 2024
1 parent 561d3a7 commit ccf4b4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nixos/modules/services/web-apps/mastodon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ let
BOOTSNAP_CACHE_DIR="/var/cache/mastodon/precompile";
LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so";

MASTODON_USE_LIBVIPS = true;

# Concurrency mastodon-web
WEB_CONCURRENCY = toString cfg.webProcesses;
MAX_THREADS = toString cfg.webThreads;
Expand Down Expand Up @@ -883,7 +885,7 @@ in {
# System Call Filtering
SystemCallFilter = [ ("~" + lib.concatStringsSep " " systemCallsList) "@chown" "pipe" "pipe2" ];
} // cfgService;
path = with pkgs; [ ffmpeg-headless file imagemagick ];
path = with pkgs; [ ffmpeg-headless file vips ];
};

systemd.services.mastodon-media-auto-remove = lib.mkIf cfg.mediaAutoRemove.enable {
Expand Down Expand Up @@ -970,7 +972,7 @@ in {
inherit (cfg) group;
};
})
(lib.attrsets.setAttrByPath [ cfg.user "packages" ] [ cfg.package pkgs.imagemagick ])
(lib.attrsets.setAttrByPath [ cfg.user "packages" ] [ cfg.package pkgs.vips ])
(lib.mkIf (cfg.redis.createLocally && cfg.redis.enableUnixSocket) {${config.services.mastodon.user}.extraGroups = [ "redis-mastodon" ];})
];

Expand Down

0 comments on commit ccf4b4e

Please sign in to comment.