Replace lib/hosts.nix with an injected special argument containing the nix flake
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
{ 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
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user