Commit 31f095fa authored by Felix Singer's avatar Felix Singer
Browse files

nixos/redmine: Set up runtime directory by using RuntimeDirectory option



Instead of letting systemd tmpfiles set up the runtime directory, use
the option `RuntimeDirectory` from the systemd service config since the
configured path stays read-writable when ProtectSystem is set to
`strict`. This is equal to adding the path to ReadWritePaths.

Signed-off-by: default avatarFelix Singer <felixsinger@posteo.net>
parent 43fbacd0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -357,7 +357,6 @@ in
      "d '${cfg.stateDir}/themes' 0750 ${cfg.user} ${cfg.group} - -"
      "d '${cfg.stateDir}/tmp' 0750 ${cfg.user} ${cfg.group} - -"

      "d /run/redmine - - - - -"
      "d /run/redmine/public - - - - -"
      "L+ /run/redmine/config - - - - ${cfg.stateDir}/config"
      "L+ /run/redmine/files - - - - ${cfg.stateDir}/files"
@@ -456,6 +455,8 @@ in
        TimeoutSec = "300";
        WorkingDirectory = "${cfg.package}/share/redmine";
        ExecStart = "${bundle} exec rails server -u webrick -e production -b ${toString cfg.address} -p ${toString cfg.port} -P '${cfg.stateDir}/redmine.pid'";
        RuntimeDirectory = "redmine";
        RuntimeDirectoryMode = "0750";
        AmbientCapabilities = "";
        CapabilityBoundingSet = "";
        LockPersonality = true;