From e6ed60548397627bf10f561f9438201dbba0a36e Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 21 Apr 2024 02:15:42 +0300 Subject: 2024-04-21 --- modules/profiles/dev/containers.nix | 71 +++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 modules/profiles/dev/containers.nix (limited to 'modules/profiles/dev/containers.nix') diff --git a/modules/profiles/dev/containers.nix b/modules/profiles/dev/containers.nix new file mode 100644 index 0000000..f75a26b --- /dev/null +++ b/modules/profiles/dev/containers.nix @@ -0,0 +1,71 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; +let + cfg = config.nixfiles.modules.profiles.dev.containers; +in +{ + options.nixfiles.modules.profiles.dev.containers.enable = + mkEnableOption "Tools for working with containers and container orchestration" + // { + default = config.nixfiles.modules.profiles.dev.enable; + }; + + config = mkIf cfg.enable { + nixfiles.modules = { + common.shell.aliases = { + h = "helm"; + k = "kubectl"; + kns = "kubens"; + ktx = "kubectx"; + b = "buildah"; + }; + podman.enable = true; + }; + + hm = { + home = { + sessionVariables = { + MINIKUBE_HOME = "${config.dirs.config}/minikube"; + MINIKUBE_IN_STYLE = "false"; + WERF_DEV = "true"; + WERF_INSECURE_REGISTRY = "true"; + WERF_LOG_DEBUG = "true"; + WERF_LOG_PRETTY = "false"; + WERF_LOG_VERBOSE = "true"; + WERF_SYNCHRONIZATION = ":local"; + WERF_TELEMETRY = "false"; + }; + + packages = with pkgs; [ + buildah + k9s + kubectl + kubectl-doctor + kubectl-images + kubectl-tree + kubectx + kubelogin-oidc + kubent + kubernetes-helm + kubespy + minikube + skopeo + stern + telepresence2 + werf + ]; + }; + + xdg.dataFile."minikube/config/config.json".text = generators.toJSON { } { + config.Rootless = true; + driver = "podman"; + container-runtime = "cri-o"; + }; + }; + }; +} -- cgit 1.4.1