27 lines
482 B
Nix
27 lines
482 B
Nix
|
{ pkgs ? import ../pkgs {} }:
|
||
|
|
||
|
with pkgs.lib;
|
||
|
|
||
|
rec {
|
||
|
hostsDir = ../hosts;
|
||
|
|
||
|
hostNames = attrNames (
|
||
|
filterAttrs (
|
||
|
name: type: type == "directory"
|
||
|
) (
|
||
|
builtins.readDir hostsDir
|
||
|
)
|
||
|
);
|
||
|
|
||
|
hosts = listToAttrs (
|
||
|
map (
|
||
|
hostName: nameValuePair hostName (
|
||
|
import (pkgs.path + "/nixos") {
|
||
|
configuration = import (hostsDir + "/${hostName}/configuration.nix");
|
||
|
system = "x86_64-linux";
|
||
|
}
|
||
|
)
|
||
|
) hostNames
|
||
|
);
|
||
|
}
|