buildClan function: export all machines via nixosModules/darwinModules
We want each machine not only to be exposed via nixosConfigurations but also as a module. This allows re-importing the machine in tests and override the architecture for example.
This commit is contained in:
@@ -162,6 +162,32 @@ in
|
||||
default = { };
|
||||
};
|
||||
|
||||
nixosModules = lib.mkOption {
|
||||
# Hide from documentation.
|
||||
# Exposed at the top-level of the flake, clan.nixosModules should not used by the user.
|
||||
# Instead, the user should use the `.#nixosModules` attribute of the flake output.
|
||||
visible = false;
|
||||
type = types.lazyAttrsOf types.raw;
|
||||
default = { };
|
||||
description = ''
|
||||
NixOS modules that are generated by clan.
|
||||
These are used to generate the `nixosConfigurations`.
|
||||
'';
|
||||
};
|
||||
|
||||
darwinModules = lib.mkOption {
|
||||
# Hide from documentation.
|
||||
# Exposed at the top-level of the flake, clan.darwinModules should not used by the user.
|
||||
# Instead, the user should use the `.#darwinModules` attribute of the flake output.
|
||||
visible = false;
|
||||
type = types.lazyAttrsOf types.raw;
|
||||
default = { };
|
||||
description = ''
|
||||
Darwin modules that are generated by clan.
|
||||
These are used to generate the `darwinConfigurations`.
|
||||
'';
|
||||
};
|
||||
|
||||
# flake.clanInternals
|
||||
clanInternals = lib.mkOption {
|
||||
# Hide from documentation. Exposes internals to the cli.
|
||||
|
||||
Reference in New Issue
Block a user