about summary refs log tree commit diff
path: root/modules/common/profiles/dev/containers.nix
blob: cc24ab3e86b8079b7a91f21efe1cb33c7da572bf (plain) (blame)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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