move clan definition to its own module
This commit is contained in:
44
flake.nix
44
flake.nix
@@ -19,6 +19,7 @@
|
|||||||
inputs.nix-topology.flakeModule
|
inputs.nix-topology.flakeModule
|
||||||
|
|
||||||
./devShells/flake-module.nix
|
./devShells/flake-module.nix
|
||||||
|
./machines/flake-module.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
systems = [
|
systems = [
|
||||||
@@ -26,49 +27,6 @@
|
|||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
];
|
];
|
||||||
|
|
||||||
clan = {
|
|
||||||
meta.name = "blossom";
|
|
||||||
|
|
||||||
inventory = {
|
|
||||||
instances = {
|
|
||||||
"rpqt-admin" = {
|
|
||||||
module.input = "clan-core";
|
|
||||||
module.name = "admin";
|
|
||||||
roles.default.machines = {
|
|
||||||
"crocus" = { };
|
|
||||||
"genepi" = { };
|
|
||||||
"haze" = { };
|
|
||||||
};
|
|
||||||
roles.default.settings.allowedKeys = {
|
|
||||||
rpqt_haze = (import ./parts).keys.rpqt.haze;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
zerotier.default = {
|
|
||||||
roles.controller.machines = [
|
|
||||||
"crocus"
|
|
||||||
];
|
|
||||||
roles.peer.machines = [
|
|
||||||
"haze"
|
|
||||||
"genepi"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
sshd.default = {
|
|
||||||
roles.server.machines = [ "crocus" ];
|
|
||||||
};
|
|
||||||
user-password.rpqt = {
|
|
||||||
roles.default.machines = [
|
|
||||||
"crocus"
|
|
||||||
"genepi"
|
|
||||||
"haze"
|
|
||||||
];
|
|
||||||
config.user = "rpqt";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
perSystem = _: {
|
perSystem = _: {
|
||||||
topology.modules = [
|
topology.modules = [
|
||||||
./topology.nix
|
./topology.nix
|
||||||
|
|||||||
50
machines/flake-module.nix
Normal file
50
machines/flake-module.nix
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
|
||||||
|
clan = {
|
||||||
|
meta.name = "blossom";
|
||||||
|
|
||||||
|
inventory.instances = {
|
||||||
|
"rpqt-admin" = {
|
||||||
|
module.input = "clan-core";
|
||||||
|
module.name = "admin";
|
||||||
|
roles.default.machines = {
|
||||||
|
"crocus" = { };
|
||||||
|
"genepi" = { };
|
||||||
|
"haze" = { };
|
||||||
|
};
|
||||||
|
roles.default.settings.allowedKeys = {
|
||||||
|
rpqt_haze = (import ../parts).keys.rpqt.haze;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"rpqt-zerotier" = {
|
||||||
|
module.input = "clan-core";
|
||||||
|
module.name = "zerotier";
|
||||||
|
roles.controller.machines.crocus = { };
|
||||||
|
roles.moon.machines.crocus = {
|
||||||
|
settings = {
|
||||||
|
stableEndpoints = [
|
||||||
|
"167.235.28.141"
|
||||||
|
"2a01:4f8:1c1e:e415::/64"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
roles.peer.tags."all" = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
inventory.services = {
|
||||||
|
sshd.default = {
|
||||||
|
roles.server.tags = [ "all" ];
|
||||||
|
};
|
||||||
|
user-password.rpqt = {
|
||||||
|
roles.default.machines = [
|
||||||
|
"crocus"
|
||||||
|
"genepi"
|
||||||
|
"haze"
|
||||||
|
];
|
||||||
|
config.user = "rpqt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user