about summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/k3s/default.nix
blob: 58984502d98fdf6b98d3233209d6d2ee87fb7b8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{ lib, callPackage, ... }@args:

let
  k3s_builder = import ./builder.nix lib;
  common = opts: callPackage (k3s_builder opts);
  # extraArgs is the extra arguments passed in by the caller to propogate downward.
  # This is to allow all-packages.nix to do:
  #
  #     let k3s_1_23 = (callPackage ./path/to/k3s {
  #       commonK3sArg = ....
  #     }).k3s_1_23;
  extraArgs = builtins.removeAttrs args [ "callPackage" ];
in
{
  k3s_1_26 = common (
    (import ./1_26/versions.nix)
    // {
      updateScript = [
        ./update-script.sh
        "26"
      ];
    }
  ) extraArgs;

  # 1_27 can be built with the same builder as 1_26
  k3s_1_27 = common (
    (import ./1_27/versions.nix)
    // {
      updateScript = [
        ./update-script.sh
        "27"
      ];
    }
  ) extraArgs;

  # 1_28 can be built with the same builder as 1_26
  k3s_1_28 = common (
    (import ./1_28/versions.nix)
    // {
      updateScript = [
        ./update-script.sh
        "28"
      ];
    }
  ) extraArgs;

  # 1_29 can be built with the same builder as 1_26
  k3s_1_29 = common (
    (import ./1_29/versions.nix)
    // {
      updateScript = [
        ./update-script.sh
        "29"
      ];
    }
  ) extraArgs;

  # 1_30 can be built with the same builder as 1_26
  k3s_1_30 = common (
    (import ./1_30/versions.nix)
    // {
      updateScript = [
        ./update-script.sh
        "30"
      ];
    }
  ) extraArgs;
}