Pin nixos version for k0

This commit is contained in:
Jonas Juselius
2021-08-13 12:24:04 +02:00
parent 0226532e2e
commit e72b8f7f7d
3 changed files with 14 additions and 7 deletions

View File

@@ -47,7 +47,7 @@ let
k8s = {
enable = true;
node.enable = true;
node.enable = mkDefault true;
clusterName = "k0";
initca = ./ca;
cidr = "10.100.0.0/16";

View File

@@ -1,4 +1,6 @@
with import <nixpkgs> {};
# Pin the deployment package-set to a specific version of nixpkgs
# with import <nixpkgs> {};
with import ../nixos-21.05.nix {};
let
master = {
@@ -6,6 +8,7 @@ let
node.address = "10.1.8.50";
features.k8s.master.enable = true;
features.k8s.nodes = nodes;
services.kubernetes.kubelet.unschedulable = true;
imports = [ ./cluster.nix ./hw/k0-0.nix ];
};
@@ -15,11 +18,11 @@ let
];
mkNode = x: {
"${x.name}" = {
node.name = x.name;
node.address = x.address;
imports = [ ./cluster.nix (./hw + "/${x.name}.nix") ];
};
"${x.name}" =
{
node = x;
imports = [ ./cluster.nix (./hw + "/${x.name}.nix") ];
};
};
in

4
clusters/nixos-21.05.nix Normal file
View File

@@ -0,0 +1,4 @@
import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/ad6e733d633802620b5eec9be91e837973eac18a.tar.gz";
sha256 = "0220v3389awigxih0hrphnnc22gmslliv1q6f0f2cjk6ibhq5fff";
})