commit efe5354a787b148a69c66d4a161aaaf985292697
parent c8687ee83f6799735348657b305ee20555552428
Author: Vincent Demeester <vincent@sbr.pm>
Date: Thu, 27 Jun 2019 18:25:56 +0200
profiles.kubernetes: add tkn completion for zsh…
… and allow to not required `containers`.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/machines/hokkaido.nix b/machines/hokkaido.nix
@@ -8,6 +8,10 @@
kubectx
kustomize
];
+ profiles.containers.kubernetes = {
+ enable = true;
+ containers = false;
+ };
profiles.finances.enable = true;
profiles.zsh = {
enable = true;
diff --git a/modules/profiles/kubernetes.nix b/modules/profiles/kubernetes.nix
@@ -12,6 +12,11 @@ in
description = "Enable kubernetes profile";
type = types.bool;
};
+ containers= mkOption {
+ default = true;
+ description = "Enable containers profile alongside";
+ type = types.bool;
+ };
minikube = {
enable = mkOption {
default = false;
@@ -28,7 +33,7 @@ in
};
config = mkIf cfg.enable (mkMerge [
{
- profiles.containers.enable = true;
+ profiles.containers.enable = cfg.containers;
home.packages = with pkgs; [
#cri-tools
kail
@@ -39,6 +44,11 @@ in
nur.repos.vdemeester.tkn
];
}
+ (mkIf config.profiles.zsh.enable {
+ programs.zsh.initExtra = ''
+ source <(tkn completion zsh)
+ '';
+ })
(mkIf cfg.minikube.enable {
home.packages = with pkgs; [
cfg.minikube.package