nixos/ipfs: Only set ReadWritePaths when hardened

Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
This commit is contained in:
Max 2022-03-30 01:42:00 +02:00
parent ce8cbe3c01
commit 72d6d73e37

View file

@ -280,7 +280,7 @@ in
User = cfg.user;
Group = cfg.group;
StateDirectory = "";
ReadWritePaths = [ "" cfg.dataDir ];
ReadWritePaths = optionals (!cfg.autoMount) [ "" cfg.dataDir ];
} // optionalAttrs (cfg.serviceFdlimit != null) { LimitNOFILE = cfg.serviceFdlimit; };
} // optionalAttrs (!cfg.startWhenNeeded) {
wantedBy = [ "default.target" ];