clanModules: remove unused test code

This commit is contained in:
Johannes Kirschbauer
2025-08-16 11:58:55 +02:00
parent 308a10d6e6
commit 4a51aa9316
6 changed files with 6 additions and 116 deletions

View File

@@ -1,6 +1,5 @@
{
lib,
clanLib,
}:
let
baseModule =
@@ -52,7 +51,6 @@ let
# ''
evaled;
in
{
evalClanModules = evalClanModulesLegacy;

View File

@@ -31,66 +31,6 @@ let
'';
};
};
moduleConfig = lib.mkOption {
default = { };
# TODO: use types.deferredModule
# clan.borgbackup MUST be defined as submodule
type = types.attrsOf types.anything;
description = ''
Configuration of the specific clanModule.
!!! Note
Configuration is passed to the nixos configuration scoped to the module.
```nix
clan.<serviceName> = { ... # Config }
```
'';
};
extraModulesOption = lib.mkOption {
description = ''
List of additionally imported `.nix` expressions.
Supported types:
- **Strings**: Interpreted relative to the 'directory' passed to `lib.clan`.
- **Paths**: should be relative to the current file.
- **Any**: Nix expression must be serializable to JSON.
!!! Note
**The import only happens if the machine is part of the service or role.**
Other types are passed through to the nixos configuration.
???+ Example
To import the `special.nix` file
```
. Clan Directory
flake.nix
...
modules
special.nix
...
```
```nix
{
extraModules = [ "modules/special.nix" ];
}
```
'';
apply = value: if lib.isString value then value else builtins.seq (builtins.toJSON value) value;
default = [ ];
type = types.listOf (
types.oneOf [
types.str
types.anything
]
);
};
in
{
imports = [

View File

@@ -12,6 +12,9 @@
builtins.removeAttrs (clanLib.introspection.getPrios { options = config.inventory.options; })
# tags are freeformType which is not supported yet.
# services is removed and throws an error if accessed.
[ "tags" "services"];
[
"tags"
"services"
];
};
}