clanCore.secrets: facts.value can be null or str
Some checks failed
checks-impure / test (pull_request) Failing after 7s
checks / test (pull_request) Successful in 22s

This commit is contained in:
lassulus 2023-09-27 10:31:10 +02:00
parent 51c1940a1b
commit 5cf9b4428f

View File

@ -93,11 +93,12 @@
};
value = lib.mkOption {
defaultText = lib.literalExpression "\${config.clanCore.clanDir}/\${fact.config.path}";
type = lib.types.nullOr lib.types.str;
default =
if builtins.pathExists "${config.clanCore.clanDir}/${fact.config.path}" then
builtins.readFile "${config.clanCore.clanDir}/${fact.config.path}"
else
"";
null;
};
};
}));