-
Notifications
You must be signed in to change notification settings - Fork 0
/
hive.nix
29 lines (24 loc) · 810 Bytes
/
hive.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
let
inputs = import ./deps;
lib = (import "${inputs.nixpkgs}/lib").extend (import ./lib inputs);
mkLibForMachine =
machine:
(import "${lib.infra.machines.${machine}.nixpkgs_version}/lib").extend (import ./lib inputs);
inherit ((import ./.)) nixosConfigurations;
in
{
meta = {
nodeNixpkgs = builtins.mapAttrs (
n: _: import lib.infra.machines.${n}.nixpkgs_version
) nixosConfigurations;
nodeSpecialArgs = builtins.mapAttrs (
n: v: v._module.specialArgs // { lib = mkLibForMachine n; }
) nixosConfigurations;
};
defaults =
{ config, lib, ... }:
{
deployment.targetHost = lib.mkDefault lib.infra.machines.${config.networking.hostName}.ipv6.public;
};
}
// builtins.mapAttrs (_: v: { imports = v._module.args.modules; }) nixosConfigurations