add colmena function

This commit is contained in:
Pyrox 2023-03-06 22:23:54 -05:00
parent b5082195be
commit 0d5ac5b96b
Signed by: thehedgehog
GPG key ID: 8CDF3F7CAA53A0F5

26
lib/colmena.nix Normal file
View file

@ -0,0 +1,26 @@
{ inputs, overlays }:
let
inherit (builtins) mapAttrs;
in {
# From https://github.com/otavio/nix-config/blob/master/lib/default.nix
mkColmenaFromNixOSConfigurations = nixosConfigurations:
{
meta = {
description = "Pyrox's Deployments";
nixpkgs = import inputs.nixpkgs {
system = "x86_64-linux";
inherit overlays;
};
specialArgs = {
inherit inputs;
};
};
} // mapAttrs
(name: value:
{
nixpkgs.system = value.config.nixpkgs.system;
imports = value._module.args.modules;
})
nixosConfigurations;
}