2019-03-12 20:33:56 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
{
|
|
|
|
|
imports = [ ./base.nix ];
|
|
|
|
|
|
|
|
|
|
options.submodule = {
|
|
|
|
|
name = mkOption {
|
|
|
|
|
description = "Module name";
|
|
|
|
|
type = types.str;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
description = mkOption {
|
|
|
|
|
description = "Module description";
|
|
|
|
|
type = types.str;
|
|
|
|
|
default = "";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
version = mkOption {
|
|
|
|
|
description = "Module version";
|
|
|
|
|
type = types.str;
|
|
|
|
|
default = "1.0.0";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
tags = mkOption {
|
|
|
|
|
description = "List of submodule tags";
|
|
|
|
|
type = types.listOf types.str;
|
2021-05-13 17:27:08 -04:00
|
|
|
default = [ ];
|
2019-03-12 20:33:56 +01:00
|
|
|
};
|
|
|
|
|
|
2019-10-10 13:00:52 +02:00
|
|
|
exports = mkOption {
|
|
|
|
|
description = "Attribute set of functions to export";
|
|
|
|
|
type = types.attrs;
|
2021-05-13 17:27:08 -04:00
|
|
|
default = { };
|
2019-10-10 13:00:52 +02:00
|
|
|
};
|
|
|
|
|
|
2019-03-12 20:33:56 +01:00
|
|
|
passthru = mkOption {
|
2019-10-06 21:36:13 +02:00
|
|
|
description = "Attribute set to passthru";
|
2019-03-12 20:33:56 +01:00
|
|
|
type = types.attrs;
|
2021-05-13 17:27:08 -04:00
|
|
|
default = { };
|
2019-03-12 20:33:56 +01:00
|
|
|
};
|
2019-03-20 21:07:49 +01:00
|
|
|
|
2021-05-13 17:27:08 -04:00
|
|
|
args._empty = mkOption { };
|
2019-03-12 20:33:56 +01:00
|
|
|
};
|
|
|
|
|
|
2019-03-20 21:07:49 +01:00
|
|
|
config._module.args.args = config.submodule.args;
|
2021-05-13 17:27:08 -04:00
|
|
|
config._m.features = [ "submodule" ];
|
2019-03-12 20:33:56 +01:00
|
|
|
}
|