clanCore.secrets: facts.value can be null or str

This commit is contained in:
lassulus
2023-09-27 10:31:10 +02:00
parent c51175e4eb
commit 5bf28c1731

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;
};
};
}));