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 = {
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 = [