nixos/murmur: Use lib.types.path where possible (#445293)

This commit is contained in:
h7x4
2025-09-22 19:34:54 +00:00
committed by GitHub
+12 -12
View File
@@ -41,9 +41,9 @@ let
${lib.optionalString (cfg.registerHostname != "") "registerHostname=${cfg.registerHostname}"}
certrequired=${lib.boolToString cfg.clientCertRequired}
${lib.optionalString (cfg.sslCert != "") "sslCert=${cfg.sslCert}"}
${lib.optionalString (cfg.sslKey != "") "sslKey=${cfg.sslKey}"}
${lib.optionalString (cfg.sslCa != "") "sslCA=${cfg.sslCa}"}
${lib.optionalString (cfg.sslCert != null) "sslCert=${cfg.sslCert}"}
${lib.optionalString (cfg.sslKey != null) "sslKey=${cfg.sslKey}"}
${lib.optionalString (cfg.sslCa != null) "sslCA=${cfg.sslCa}"}
${lib.optionalString (cfg.dbus != null) "dbus=${cfg.dbus}"}
@@ -238,20 +238,20 @@ in
clientCertRequired = lib.mkEnableOption "requiring clients to authenticate via certificates";
sslCert = lib.mkOption {
type = lib.types.str;
default = "";
type = lib.types.nullOr lib.types.path;
default = null;
description = "Path to your SSL certificate.";
};
sslKey = lib.mkOption {
type = lib.types.str;
default = "";
type = lib.types.nullOr lib.types.path;
default = null;
description = "Path to your SSL key.";
};
sslCa = lib.mkOption {
type = lib.types.str;
default = "";
type = lib.types.nullOr lib.types.path;
default = null;
description = "Path to your SSL CA certificate.";
};
@@ -418,13 +418,13 @@ in
+ lib.optionalString cfg.logToFile ''
rw /var/log/murmur/murmurd.log,
''
+ lib.optionalString (cfg.sslCert != "") ''
+ lib.optionalString (cfg.sslCert != null) ''
r ${cfg.sslCert},
''
+ lib.optionalString (cfg.sslKey != "") ''
+ lib.optionalString (cfg.sslKey != null) ''
r ${cfg.sslKey},
''
+ lib.optionalString (cfg.sslCa != "") ''
+ lib.optionalString (cfg.sslCa != null) ''
r ${cfg.sslCa},
''
+ lib.optionalString (cfg.dbus != null) ''