forked from clan/clan-core
Merge pull request 'checks: add check for rendering docs' (#1058) from DavHau-dave into main
This commit is contained in:
commit
0676bf7283
@ -16,6 +16,15 @@
|
||||
{
|
||||
checks =
|
||||
let
|
||||
# ensure all options can be rendered after importing clan into nixos
|
||||
renderClanOptions =
|
||||
let
|
||||
docs = pkgs.nixosOptionsDoc {
|
||||
options = (pkgs.nixos { imports = [ self.nixosModules.clanCore ]; }).options;
|
||||
warningsAreErrors = false;
|
||||
};
|
||||
in
|
||||
docs.optionsJSON;
|
||||
nixosTestArgs = {
|
||||
# reference to nixpkgs for the current system
|
||||
inherit pkgs;
|
||||
@ -45,7 +54,7 @@
|
||||
self'.legacyPackages.homeConfigurations or { }
|
||||
);
|
||||
in
|
||||
nixosTests // schemaTests // flakeOutputs;
|
||||
{ inherit renderClanOptions; } // nixosTests // schemaTests // flakeOutputs;
|
||||
legacyPackages = {
|
||||
nixosTests =
|
||||
let
|
||||
|
@ -7,5 +7,6 @@ in
|
||||
type = lib.types.attrs;
|
||||
description = "The json schema for the .clan options namespace";
|
||||
default = jsonschema.parseOptions options.clan;
|
||||
defaultText = lib.literalExpression "jsonschema.schemaToJSON options.clan";
|
||||
};
|
||||
}
|
||||
|
@ -135,6 +135,7 @@
|
||||
path to a secret which is generated by the generator
|
||||
'';
|
||||
default = "${config'.clanCore.secretsDirectory}/${config'.clanCore.secretsPrefix}${config.name}";
|
||||
defaultText = lib.literalExpression "\${config'.clanCore.secretsDirectory}/\${config'.clanCore.secretsPrefix}\${config.name}";
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (config'.clanCore.secretStore == "sops") {
|
||||
@ -173,6 +174,7 @@
|
||||
default =
|
||||
config.clanCore.clanDir
|
||||
+ "/machines/${config.clanCore.machineName}/facts/${fact.config._module.args.name}";
|
||||
defaultText = lib.literalExpression "\${config.clanCore.clanDir}/machines/\${config.clanCore.machineName}/facts/\${fact.config._module.args.name}";
|
||||
};
|
||||
value = lib.mkOption {
|
||||
defaultText = lib.literalExpression "\${config.clanCore.clanDir}/\${fact.config.path}";
|
||||
|
@ -24,6 +24,7 @@ in
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = config.clanCore.clanName;
|
||||
defaultText = "config.clanCore.clanName";
|
||||
description = ''
|
||||
zerotier network name
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user