Refactor modules/features a bit
This commit is contained in:
@@ -13,19 +13,18 @@ let
|
||||
};
|
||||
|
||||
master = {
|
||||
features.host = {
|
||||
name = "k1-0";
|
||||
address = "10.1.30.100";
|
||||
};
|
||||
features.k8s = {
|
||||
host.name = "k1-0";
|
||||
host.address = "10.1.30.100";
|
||||
master.enable = true;
|
||||
master.socat443 = true;
|
||||
nodes = nodes;
|
||||
inherit etcdCluster;
|
||||
};
|
||||
fileSystems = {
|
||||
"/vol/local-storage/vol1" = {
|
||||
device = "/vol/vol1";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
};
|
||||
imports = [ ./cluster.nix ./hw/k1-0.nix ];
|
||||
};
|
||||
|
||||
@@ -41,7 +40,7 @@ let
|
||||
"${x.name}" =
|
||||
lib.mkMerge [
|
||||
{
|
||||
features.k8s.host = x;
|
||||
features.host = x;
|
||||
}
|
||||
(if builtins.hasAttr x.name etcdNodes then
|
||||
{
|
||||
@@ -54,6 +53,6 @@ let
|
||||
|
||||
in
|
||||
builtins.foldl' (a: x: a // mkNode x) {
|
||||
"${master.features.k8s.host.name}" = master;
|
||||
"${master.features.host.name}" = master;
|
||||
} nodes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user