-
Notifications
You must be signed in to change notification settings - Fork 2
/
devcontainer-gcp-cli-tools.nix
43 lines (43 loc) · 1.36 KB
/
devcontainer-gcp-cli-tools.nix
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
topLevel@{ flake-parts-lib, inputs, ... }: {
imports = [
./devcontainer.nix
inputs.flake-parts.flakeModules.flakeModules
];
flake.flakeModules.devcontainerGcpCliTools = {
imports = [
topLevel.config.flake.flakeModules.devcontainer
];
options.perSystem = flake-parts-lib.mkPerSystemOption ({ lib, config, pkgs, ... }: {
ml-ops.devcontainer = {
config.devenvShellModule.packages = lib.mkAfter [
pkgs.go-containerregistry
config.ml-ops.devcontainer.gcp.sdk.package
];
options.gcp.sdk = lib.mkOption {
default = { };
type = lib.types.submoduleWith {
modules = [
({ config, ... }: {
options = {
extraComponents = lib.mkOption {
default = [
config.basePackage.components.gke-gcloud-auth-plugin
config.basePackage.components.kubectl
];
};
basePackage = lib.mkOption {
default = pkgs.google-cloud-sdk;
};
package = lib.mkOption {
default =
config.basePackage.withExtraComponents config.extraComponents;
};
};
})
];
};
};
};
});
};
}