webdav-server-rs: Add debug option

This commit is contained in:
Daniel Poelzleithner 2023-02-09 11:46:29 +01:00
parent e24aeba89a
commit fa60722e96

View File

@ -28,6 +28,12 @@ in
description = lib.mdDoc "Group to run under when setuid is not enabled.";
};
debug = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc "Enable debug mode.";
};
settings = mkOption {
type = format.type;
default = { };
@ -111,7 +117,7 @@ in
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.webdav-server-rs}/bin/webdav-server -c ${cfg.configFile}";
ExecStart = "${pkgs.webdav-server-rs}/bin/webdav-server ${lib.optionalString cfg.debug "--debug"} -c ${cfg.configFile}";
CapabilityBoundingSet = [
"CAP_SETUID"