diff options
| author | M. A <mak@nyantec.com> | 2022-06-13 15:33:12 +0000 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2022-06-22 17:36:16 +0000 |
| commit | 4bab5cf0470385e1a7fd211e2efc6729b6efbbca (patch) | |
| tree | 78657329d0893d73cc1470eb56c056e79a042fe3 | |
| parent | Merge pull request #178580 from NixOS/backport-178458-to-release-22.05 (diff) | |
| download | nixpkgs-origin/backport-177536-to-release-22.05.tar.gz | |
nixos/hedgedoc: Do not set StateDirectory to an absolute pathorigin/backport-177536-to-release-22.05
Commit 8109d8a set 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 commit becff585796094f75d0ccbe1df5418ef873897ac)
| -rw-r--r-- | nixos/modules/services/web-apps/hedgedoc.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/hedgedoc.nix b/nixos/modules/services/web-apps/hedgedoc.nix index 6a46ffbd17d4..5ddc963cdd68 100644 --- a/nixos/modules/services/web-apps/hedgedoc.nix +++ b/nixos/modules/services/web-apps/hedgedoc.nix @@ -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 = [ |
