mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-12-06 04:16:19 +01:00
Keep the six node configuration intact while removing the failing user activation from the three control-plane MicroVMs. Update the regression test and current K3s configuration notes.
38 lines
893 B
Nix
38 lines
893 B
Nix
{
|
|
# NOTE: the args not used in this file CAN NOT be removed!
|
|
# because haumea pass argument lazily,
|
|
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
|
inputs,
|
|
lib,
|
|
mylib,
|
|
myvars,
|
|
system,
|
|
genSpecialArgs,
|
|
...
|
|
}@args:
|
|
let
|
|
name = "k3s-test-1-master-2";
|
|
tags = [ name ];
|
|
ssh-user = "root";
|
|
|
|
modules = {
|
|
# the host dir is the complete config (it pulls in the shared modules)
|
|
nixos-modules =
|
|
(map mylib.relativeToRoot [
|
|
"hosts/k8s/${name}"
|
|
])
|
|
++ [
|
|
# this runs as a MicroVM
|
|
inputs.microvm.nixosModules.microvm
|
|
{ modules.secrets.server.kubernetes.enable = true; }
|
|
];
|
|
};
|
|
|
|
systemArgs = modules // args;
|
|
in
|
|
{
|
|
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
|
|
|
colmena.${name} = mylib.colmenaSystem (systemArgs // { inherit tags ssh-user; });
|
|
}
|