mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
nixos/hedgedoc: Do not set StateDirectory to an absolute path
Commit8109d8aset the `StateDirectory=` option of the systemd service configuration to the value of `cfg.workDir` which is wrong, according to dasJ [1]. This commit resolves this issue by stripping the `/var/lib/` prefix from `cfg.workDir`. [1] https://github.com/NixOS/nixpkgs/pull/172824#issuecomment-1130350412 (cherry picked from commitbecff58579)
This commit is contained in:
committed by
github-actions[bot]
parent
21321a6381
commit
4bab5cf047
@@ -1023,7 +1023,8 @@ in
|
||||
'';
|
||||
serviceConfig = {
|
||||
WorkingDirectory = cfg.workDir;
|
||||
StateDirectory = [ cfg.workDir cfg.configuration.uploadsPath ];
|
||||
StateDirectory = [ (builtins.replaceStrings [ "/var/lib/" ] [ "" ] cfg.workDir) ];
|
||||
ReadWritePaths = [ cfg.configuration.uploadsPath ];
|
||||
ExecStart = "${cfg.package}/bin/hedgedoc";
|
||||
EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
|
||||
Environment = [
|
||||
|
||||
Reference in New Issue
Block a user