add colmena

This commit is contained in:
2025-10-30 15:44:44 +08:00
parent 0c8eeec43c
commit 97c47ca04a
5 changed files with 47 additions and 27 deletions

View File

@@ -25,20 +25,41 @@
outputs =
inputs:
inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
snowfall = {
namespace = "snowfall";
let
flake = inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
snowfall = {
namespace = "snowfall";
};
systems.modules.nixos = with inputs; [
agenix.nixosModules.default
];
homes.modules = with inputs; [
agenix.homeManagerModules.default
];
channels-config = {
allowUnfree = true;
};
};
systems.modules.nixos = with inputs; [
agenix.nixosModules.default
];
homes.modules = with inputs; [
agenix.homeManagerModules.default
];
channels-config = {
allowUnfree = true;
inv = import ./inventory.nix;
mkNode = name: node: {
imports = [ (./systems/x86_64-linux + "/${name}") ];
deployment.targetHost = node.zerotierIp;
};
};
colmenaNodes = builtins.mapAttrs mkNode inv.nodes;
colmenaHive = inputs.colmena.lib.makeHive (
{
meta = {
nixpkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
specialArgs = { inherit inputs; };
};
}
// colmenaNodes
);
in
flake // { colmenaHive = colmenaHive; };
}