Skip to content

Commit cb6478b

Browse files
committed
don't use "injected" pkgs anywhere
since we do weird pkgs pinning this is OK.
1 parent dc09c8d commit cb6478b

7 files changed

Lines changed: 21 additions & 24 deletions

File tree

kubenix/builder.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
config,
33
lib,
4-
pkgs,
54
x86Pkgs,
65
armPkgs,
6+
curPkgs,
77
mkNCSI,
88
...
99
}:
@@ -38,7 +38,7 @@ in
3838
};
3939
resources = lib.mkOption {
4040
description = "Resource requests/limits for builder pods";
41-
type = (pkgs.formats.json { }).type;
41+
type = (curPkgs.formats.json { }).type;
4242
default = {
4343
requests = {
4444
cpu = "1";
@@ -68,7 +68,7 @@ in
6868
};
6969
nixConfig = lib.mkOption {
7070
description = "nix.conf for builder pods";
71-
type = (import ./nixOptions.nix) pkgs;
71+
type = (import ./nixOptions.nix) curPkgs;
7272
};
7373
deployments = lib.mkOption {
7474
type = lib.types.attrsOf deployType;

kubenix/cache.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
config,
33
lib,
4-
pkgs,
54
x86Pkgs,
65
armPkgs,
6+
curPkgs,
77
mkNCSI,
88
...
99
}:
@@ -16,7 +16,7 @@ in
1616
enable = lib.mkEnableOption "cache";
1717
nixConfig = lib.mkOption {
1818
description = "nix.conf for cache pod";
19-
type = (import ./nixOptions.nix) pkgs;
19+
type = (import ./nixOptions.nix) curPkgs;
2020
};
2121

2222
storageClassName = lib.mkOption {

kubenix/ci/default.nix

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
config,
3-
pkgs,
3+
curPkgs,
44
lib,
55
mkNCSI,
66
subPath,
@@ -9,7 +9,7 @@
99
}:
1010
let
1111
cfg = config.nix-csi;
12-
system = pkgs.stdenv.hostPlatform.system;
12+
system = curPkgs.stdenv.hostPlatform.system;
1313

1414
containers = lib.mkNamedList {
1515
hello = {
@@ -114,7 +114,7 @@ in
114114
nix-csi.csi = {
115115
driver = "nix.csi.store";
116116
readOnly = true;
117-
volumeAttributes.${system} = pkgs.hello;
117+
volumeAttributes.${system} = curPkgs.hello;
118118
};
119119
};
120120
};
@@ -127,7 +127,7 @@ in
127127
spec = {
128128
restartPolicy = "Never";
129129
containers = lib.recursiveUpdate containers {
130-
hello.command = [ (lib.getExe pkgs.hello) ];
130+
hello.command = [ (lib.getExe curPkgs.hello) ];
131131
};
132132
volumes = lib.mkNamedList {
133133
nix-csi.csi = {
@@ -148,11 +148,11 @@ in
148148
hello = {
149149
command = [
150150
(lib.getExe (
151-
pkgs.writeShellApplication {
151+
curPkgs.writeShellApplication {
152152
name = "printer";
153153
runtimeInputs = [
154-
pkgs.coreutils
155-
pkgs.hello
154+
curPkgs.coreutils
155+
curPkgs.hello
156156
];
157157
text = # bash
158158
''
@@ -164,8 +164,8 @@ in
164164
))
165165
];
166166
env = lib.mkNamedList {
167-
SSL_CERT_FILE.value = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
168-
SSL_CERT_DIR.value = "${pkgs.cacert}/etc/ssl/certs";
167+
SSL_CERT_FILE.value = "${curPkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
168+
SSL_CERT_DIR.value = "${curPkgs.cacert}/etc/ssl/certs";
169169
};
170170
volumeMounts =
171171
let
@@ -186,11 +186,11 @@ in
186186
subPath = subPath "${if lib.pathExists sPath then sPath else throw "path no good homes"}";
187187
readOnly = true;
188188
};
189-
testEnv = pkgs.buildEnv {
189+
testEnv = curPkgs.buildEnv {
190190
name = "testenv";
191191
paths = [
192-
pkgs.dockerTools.fakeNss
193-
pkgs.dockerTools.binSh
192+
curPkgs.dockerTools.fakeNss
193+
curPkgs.dockerTools.binSh
194194
];
195195
};
196196
in

kubenix/config.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
config,
3-
pkgs,
43
lib,
54
mkNCSI,
65
x86Pkgs,

kubenix/daemonset.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
config,
33
lib,
4-
pkgs,
54
x86Pkgs,
65
armPkgs,
76
curPkgs,
@@ -19,7 +18,7 @@ in
1918
};
2019
nixConfig = lib.mkOption {
2120
description = "nix.conf for CSI/mounter/DaemonSet pods";
22-
type = (import ./nixOptions.nix) pkgs;
21+
type = (import ./nixOptions.nix) curPkgs;
2322
};
2423
};
2524
config =

kubenix/options.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
config,
3-
pkgs,
3+
curPkgs,
44
lib,
55
...
66
}:
@@ -53,7 +53,7 @@ in
5353
};
5454
metadata = lib.mkOption {
5555
description = "Labels added to nix-csi resources";
56-
type = (pkgs.formats.json { }).type;
56+
type = (curPkgs.formats.json { }).type;
5757
default = { };
5858
};
5959
version = lib.mkOption {
@@ -97,7 +97,7 @@ in
9797
Python logging configuration dict for nix-csi service.
9898
See https://docs.python.org/3/library/logging.config.html#logging-config-dictschema
9999
'';
100-
type = (pkgs.formats.json { }).type;
100+
type = (curPkgs.formats.json { }).type;
101101
default = {
102102
version = 1;
103103
formatters = {

kubenix/secret.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
pkgs,
32
config,
43
lib,
54
mkNCSI,

0 commit comments

Comments
 (0)