mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat: interoperate [deploy-rs, colmena]
This commit is contained in:
parent
0fef01bfe6
commit
f108a20f26
15 changed files with 235 additions and 122 deletions
38
colmena.nix
Normal file
38
colmena.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
inputs,
|
||||
systems,
|
||||
lib,
|
||||
...
|
||||
}: rec {
|
||||
colmenaHive = inputs.colmena.lib.makeHive colmena;
|
||||
colmena = let
|
||||
inherit (lib.attrsets) mapAttrs filterAttrs;
|
||||
colmenaBase = {
|
||||
meta = {
|
||||
description = "Kat's Infrastructure";
|
||||
nodeSpecialArgs = mapAttrs (_k: v: v._module.specialArgs) systems.nixosConfigurations;
|
||||
nodeNixpkgs = mapAttrs (_k: v: v.config.pkgs) systems.systems;
|
||||
nixpkgs = import inputs.nixpkgs {
|
||||
# this upsets me deeply.
|
||||
system = "x86_64-linux";
|
||||
overlays = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
colmenaHosts = mapAttrs (_k: v: {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkDefault;
|
||||
in {
|
||||
imports = v.config.modules;
|
||||
deployment =
|
||||
{
|
||||
targetPort = mkDefault (builtins.head config.services.openssh.ports);
|
||||
}
|
||||
// v.config.colmena;
|
||||
}) (filterAttrs (_k: v: v.config.folder == "nixos") systems.systems);
|
||||
in
|
||||
colmenaBase // colmenaHosts;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue