Merge pull request #177536 from yayayayaka/hedgedoc-fix-statedirectory

nixos/hedgedoc: Do not set StateDirectory to an absolute path
This commit is contained in:
Lassulus 2022-06-15 11:25:04 +02:00 committed by GitHub
commit a632afba6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1031,7 +1031,8 @@ in
''; '';
serviceConfig = { serviceConfig = {
WorkingDirectory = cfg.workDir; 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"; ExecStart = "${cfg.package}/bin/hedgedoc";
EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ]; EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
Environment = [ Environment = [