forked from clan/clan-core
checks: add check for rendering docs
This commit is contained in:
parent
d59673e89a
commit
3771be2110
@ -16,6 +16,15 @@
|
|||||||
{
|
{
|
||||||
checks =
|
checks =
|
||||||
let
|
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 = {
|
nixosTestArgs = {
|
||||||
# reference to nixpkgs for the current system
|
# reference to nixpkgs for the current system
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
@ -45,7 +54,7 @@
|
|||||||
self'.legacyPackages.homeConfigurations or { }
|
self'.legacyPackages.homeConfigurations or { }
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
nixosTests // schemaTests // flakeOutputs;
|
{ inherit renderClanOptions; } // nixosTests // schemaTests // flakeOutputs;
|
||||||
legacyPackages = {
|
legacyPackages = {
|
||||||
nixosTests =
|
nixosTests =
|
||||||
let
|
let
|
||||||
|
@ -7,5 +7,6 @@ in
|
|||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
description = "The json schema for the .clan options namespace";
|
description = "The json schema for the .clan options namespace";
|
||||||
default = jsonschema.parseOptions options.clan;
|
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
|
path to a secret which is generated by the generator
|
||||||
'';
|
'';
|
||||||
default = "${config'.clanCore.secretsDirectory}/${config'.clanCore.secretsPrefix}${config.name}";
|
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") {
|
// lib.optionalAttrs (config'.clanCore.secretStore == "sops") {
|
||||||
@ -173,6 +174,7 @@
|
|||||||
default =
|
default =
|
||||||
config.clanCore.clanDir
|
config.clanCore.clanDir
|
||||||
+ "/machines/${config.clanCore.machineName}/facts/${fact.config._module.args.name}";
|
+ "/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 {
|
value = lib.mkOption {
|
||||||
defaultText = lib.literalExpression "\${config.clanCore.clanDir}/\${fact.config.path}";
|
defaultText = lib.literalExpression "\${config.clanCore.clanDir}/\${fact.config.path}";
|
||||||
|
@ -24,6 +24,7 @@ in
|
|||||||
name = lib.mkOption {
|
name = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = config.clanCore.clanName;
|
default = config.clanCore.clanName;
|
||||||
|
defaultText = "config.clanCore.clanName";
|
||||||
description = ''
|
description = ''
|
||||||
zerotier network name
|
zerotier network name
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user