X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fwebapps%2Fmastodon.nix;h=df2dbb23dac2a2eec289a037de296790071f3c1d;hb=f0255dd5bd2b793741fa1f6f349b89219c9bd56a;hp=cd550c0e64cf75d81dc5694489e033df88e1597c;hpb=258dd18bac4bf5dd03cf1098ffa35cb954f9e015;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/webapps/mastodon.nix b/modules/webapps/mastodon.nix index cd550c0..df2dbb2 100644 --- a/modules/webapps/mastodon.nix +++ b/modules/webapps/mastodon.nix @@ -111,6 +111,10 @@ in }; }; + systemd.slices.mastodon = { + description = "Mastodon slice"; + }; + systemd.services.mastodon-streaming = { description = "Mastodon Streaming"; wantedBy = [ "multi-user.target" ]; @@ -137,6 +141,7 @@ in ''; serviceConfig = { + Slice = "mastodon.slice"; User = cfg.user; EnvironmentFile = cfg.configFile; PrivateTmp = true; @@ -162,7 +167,7 @@ in environment.BUNDLE_GEMFILE = "${cfg.workdir.gems.confFiles}/Gemfile"; environment.SOCKET = cfg.sockets.rails; - path = [ cfg.workdir.gems cfg.workdir.gems.ruby pkgs.file ]; + path = [ cfg.workdir.gems cfg.workdir.gems.ruby pkgs.file pkgs.imagemagick ]; preStart = '' install -m 0755 -d ${cfg.dataDir}/tmp/cache @@ -177,6 +182,7 @@ in exec ./bin/tootctl cache clear ''; serviceConfig = { + Slice = "mastodon.slice"; User = cfg.user; EnvironmentFile = cfg.configFile; PrivateTmp = true; @@ -239,6 +245,7 @@ in ''; serviceConfig = { + Slice = "mastodon.slice"; User = cfg.user; EnvironmentFile = cfg.configFile; PrivateTmp = true;