about summary refs log tree commit diff
path: root/modules/common/profiles/dev/containers.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-02-19 17:50:35 +0300
committerAzat Bahawi <azat@bahawi.net>2023-02-19 17:50:35 +0300
commit91fb4f28ef5d87e8bcf7749928d30ba4a9cbbd34 (patch)
treee07291fcb1cf62a561ffe58d1fd8e2968ff6fcb3 /modules/common/profiles/dev/containers.nix
parent2023-02-15 (diff)
2023-02-19
Diffstat (limited to 'modules/common/profiles/dev/containers.nix')
-rw-r--r--modules/common/profiles/dev/containers.nix76
1 files changed, 76 insertions, 0 deletions
diff --git a/modules/common/profiles/dev/containers.nix b/modules/common/profiles/dev/containers.nix
new file mode 100644
index 0000000..cc24ab3
--- /dev/null
+++ b/modules/common/profiles/dev/containers.nix
@@ -0,0 +1,76 @@
+{
+  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.default.enable;
+    };
+
+  config = mkIf cfg.enable {
+    hm = {
+      home = {
+        sessionVariables = {
+          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; [
+          argocd
+          chart-testing
+          clusterctl
+          cmctl
+          datree
+          helm
+          istioctl
+          kubeconform
+          kubectl
+          kubectl-doctor
+          kubectl-images
+          kubectl-tree
+          kubectx
+          kubelogin
+          kubent
+          kubescape
+          kubeseal
+          kubespy
+          minikube
+          skaffold
+          skopeo
+          stern
+          telepresence
+          werf
+        ];
+      };
+
+      programs.bash = {
+        shellAliases = with pkgs; {
+          b = "${buildah}/bin/buildah";
+          h = "${helm}/bin/helm";
+          k = "${kubectl}/bin/kubectl";
+          kns = "${kubectx}/bin/kubens";
+          ktx = "${kubectx}/bin/kubectx";
+        };
+        initExtra = mkAfter ''
+          _complete_alias b _buildah buildah
+          _complete_alias h __start_helm helm
+          _complete_alias k __start_kubectl kubectl
+          _complete_alias kns _kube_namespaces kubens
+          _complete_alias ktx _kube_contexts kubectx
+        '';
+      };
+    };
+  };
+}

Consider giving Nix/NixOS a try! <3