File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 pkgs ,
44 lib ,
55 mkNCSI ,
6+ subPath ,
67 inputs ,
78 ...
89} :
120121 } ;
121122 } ;
122123 } ;
124+ Job . commandpath-hello = mkNCSI {
125+ spec = {
126+ template = {
127+ spec = {
128+ restartPolicy = "Never" ;
129+ containers = lib . recursiveUpdate containers {
130+ hello . command = [ ( lib . getExe pkgs . hello ) ] ;
131+ } ;
132+ volumes = lib . mkNamedList {
133+ nix-csi . csi = {
134+ driver = "nix.csi.store" ;
135+ readOnly = true ;
136+ } ;
137+ } ;
138+ } ;
139+ } ;
140+ } ;
141+ } ;
142+ Job . env-ssl = mkNCSI {
143+ spec = {
144+ template = {
145+ spec = {
146+ restartPolicy = "Never" ;
147+ containers = lib . recursiveUpdate containers {
148+ hello = {
149+ command = [
150+ ( lib . getExe (
151+ pkgs . writeShellApplication {
152+ name = "printer" ;
153+ runtimeInputs = [
154+ pkgs . coreutils
155+ pkgs . hello
156+ ] ;
157+ text = # bash
158+ ''
159+ set -x
160+ hello
161+ ls -lah /etc/ssl/certs
162+ '' ;
163+ }
164+ ) )
165+ ] ;
166+ volumeMounts =
167+ let
168+ mkMount =
169+ package : mountPath :
170+ {
171+ mountPath = mountPath ;
172+ subPath = subPath "${ package } ${ mountPath } " ;
173+ readOnly = true ;
174+ } ;
175+ in
176+ {
177+ nix-csi = mkMount pkgs . cacert "/etc/ssl/certs" ;
178+ } ;
179+ } ;
180+ } ;
181+ volumes = lib . mkNamedList {
182+ nix-csi . csi = {
183+ driver = "nix.csi.store" ;
184+ readOnly = true ;
185+ } ;
186+ } ;
187+ } ;
188+ } ;
189+ } ;
190+ } ;
123191 } ;
124192 } ;
125193}
Original file line number Diff line number Diff line change 179179 lib . recursiveUpdate {
180180 inherit ( cfg ) metadata ;
181181 } attrs ;
182- subPath = spath : lib . removePrefix "/" toString spath ;
182+ subPath = spath : lib . removePrefix "/" ( toString spath ) ;
183183 } ;
184184
185185 nix-csi = { } ;
You can’t perform that action at this time.
0 commit comments