home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit c35db2395402d7325e786d1b3fdfea42ef2e4e65
parent 0f4e761e13fc73a0cf6bd5ee43706ddd3d033e90
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Fri, 10 Apr 2020 16:58:52 +0200

profiles.kubernetes: nixpkgs-fmt and add pkgs

- oc 4.4.x
- operator-sdk
- kss

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mmodules/profiles/kubernetes.nix | 103++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
1 file changed, 60 insertions(+), 43 deletions(-)

diff --git a/modules/profiles/kubernetes.nix b/modules/profiles/kubernetes.nix @@ -8,7 +8,7 @@ in options = { profiles.containers.kubernetes = { enable = mkEnableOption "Enable kubernetes profile"; - containers= mkOption { + containers = mkOption { default = true; description = "Enable containers profile alongside"; type = types.bool; @@ -26,47 +26,64 @@ in }; }; }; - config = mkIf cfg.enable (mkMerge [ - { - home.file.".local/share/applications/chos4.desktop".source = ../../assets/chos4.desktop; - profiles.containers.enable = cfg.containers; - home.packages = with pkgs; [ - #cri-tools - kail - kustomize - kube-prompt - kubectx - nur.repos.vdemeester.ko - nur.repos.vdemeester.kubernix - ]; - } - (mkIf cfg.nr { - xdg.configFile."nr/kubernetes" = { - text = builtins.toJSON [ - {cmd = "kubectl";} {cmd = "oc"; pkg = "openshift"; } + config = mkIf cfg.enable ( + mkMerge [ + { + home.file.".local/share/applications/chos4.desktop".source = ../../assets/chos4.desktop; + profiles.containers.enable = cfg.containers; + home.packages = with pkgs; [ + #cri-tools + kail + kustomize + kube-prompt + kubectx + nur.repos.vdemeester.oc + nur.repos.vdemeester.operator-sdk + nur.repos.vdemeester.ko + nur.repos.vdemeester.kss + nur.repos.vdemeester.kubernix ]; - onChange = "${pkgs.nur.repos.vdemeester.nr}/bin/nr -f kubernetes"; - }; - }) - (mkIf cfg.krew { - home.packages = with pkgs; [ nur.repos.vdemeester.krew ]; - }) - (mkIf config.profiles.zsh.enable { - home.file."${config.programs.zsh.dotDir}/functions/_kubectl".source = ./assets/zsh/_kubectl; - }) - (mkIf cfg.minikube.enable { - home.packages = with pkgs; [ - cfg.minikube.package - docker-machine-kvm2 - ]; - }) - (mkIf cfg.kind { - home.packages = with pkgs; [ - kind - ]; - }) - (mkIf (!config.profiles.containers.openshift.enable) { - home.packages = with pkgs; [ kubectl ]; - }) - ]); + } + ( + mkIf cfg.nr { + xdg.configFile."nr/kubernetes" = { + text = builtins.toJSON [ + { cmd = "kubectl"; } + ]; + onChange = "${pkgs.nur.repos.vdemeester.nr}/bin/nr -force kubernetes"; + }; + } + ) + ( + mkIf cfg.krew { + home.packages = with pkgs; [ nur.repos.vdemeester.krew ]; + } + ) + ( + mkIf config.profiles.zsh.enable { + home.file."${config.programs.zsh.dotDir}/functions/_kubectl".source = ./assets/zsh/_kubectl; + } + ) + ( + mkIf cfg.minikube.enable { + home.packages = with pkgs; [ + cfg.minikube.package + docker-machine-kvm2 + ]; + } + ) + ( + mkIf cfg.kind { + home.packages = with pkgs; [ + kind + ]; + } + ) + ( + mkIf (!config.profiles.containers.openshift.enable) { + home.packages = with pkgs; [ kubectl ]; + } + ) + ] + ); }