lib: Add existingPath type to validate path existence at eval time

This commit is contained in:
SebastianStork 2026-02-26 00:32:25 +01:00
parent bcf3650d2e
commit d83843e5e1
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
5 changed files with 10 additions and 6 deletions

View file

@ -28,15 +28,15 @@ in
};
caCertificateFile = lib.mkOption {
type = lib.types.path;
type = self.lib.types.existingPath;
default = ./ca.crt;
};
publicKeyFile = lib.mkOption {
type = lib.types.path;
type = self.lib.types.existingPath;
default = "${self}/hosts/${netCfg.hostName}/keys/nebula.pub";
};
certificateFile = lib.mkOption {
type = lib.types.path;
type = self.lib.types.existingPath;
default = "${self}/hosts/${netCfg.hostName}/keys/nebula.crt";
};
privateKeyFile = lib.mkOption {