clanCore.secrets: facts.value can be null or str
This commit is contained in:
@@ -93,11 +93,12 @@
|
|||||||
};
|
};
|
||||||
value = lib.mkOption {
|
value = lib.mkOption {
|
||||||
defaultText = lib.literalExpression "\${config.clanCore.clanDir}/\${fact.config.path}";
|
defaultText = lib.literalExpression "\${config.clanCore.clanDir}/\${fact.config.path}";
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
default =
|
default =
|
||||||
if builtins.pathExists "${config.clanCore.clanDir}/${fact.config.path}" then
|
if builtins.pathExists "${config.clanCore.clanDir}/${fact.config.path}" then
|
||||||
builtins.readFile "${config.clanCore.clanDir}/${fact.config.path}"
|
builtins.readFile "${config.clanCore.clanDir}/${fact.config.path}"
|
||||||
else
|
else
|
||||||
"";
|
null;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user