flake: define option for clanInternals
We need this to define test machines in different flake modules
This commit is contained in:
parent
7ff884cd71
commit
a4075510c8
|
@ -14,7 +14,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.nixosConfigurations = { inherit (clan.nixosConfigurations) test_backup_client; };
|
flake.nixosConfigurations = { inherit (clan.nixosConfigurations) test_backup_client; };
|
||||||
flake.clanInternals = clan.clanInternals;
|
flake.clanInternals.machines = clan.clanInternals.machines;
|
||||||
flake.nixosModules = {
|
flake.nixosModules = {
|
||||||
test_backup_server = { ... }: {
|
test_backup_server = { ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
18
flake.nix
18
flake.nix
|
@ -24,7 +24,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { flake-parts, ... }:
|
outputs = inputs @ { flake-parts, ... }:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } ({ ... }: {
|
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
|
@ -41,6 +41,22 @@
|
||||||
|
|
||||||
./lib/flake-module.nix
|
./lib/flake-module.nix
|
||||||
./nixosModules/flake-module.nix
|
./nixosModules/flake-module.nix
|
||||||
|
{
|
||||||
|
options.flake = flake-parts.lib.mkSubmoduleOptions {
|
||||||
|
clanInternals = lib.mkOption {
|
||||||
|
type = lib.types.submodule {
|
||||||
|
options = {
|
||||||
|
all-machines-json = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
};
|
||||||
|
machines = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.attrsOf lib.types.unspecified);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user