home

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

commit 0ef1fcba775159dc24cee15f018e8cdf7a40aaf7
parent fcc04b7b8167d37e479a032f12473242e6e8ad49
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Thu,  1 Nov 2018 16:55:31 +0100

profiles.containers: add kubernetes profile 👼

… with a minikube option…

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

Diffstat:
Mdevops.nix | 1-
Mhokkaido.nix | 2--
Dkubernetes.nix | 13-------------
Dminikube.nix | 7-------
Mmodules/module-list.nix | 1+
Amodules/profiles/kubernetes.nix | 46++++++++++++++++++++++++++++++++++++++++++++++
Mshikoku.nix | 2++
Mwakasu.nix | 2++
8 files changed, 51 insertions(+), 23 deletions(-)

diff --git a/devops.nix b/devops.nix @@ -1,7 +1,6 @@ { pkgs, prefix, ... }: { - imports = [ ./kubernetes.nix ./minikube.nix ]; home.packages = with pkgs; [ google-cloud-sdk packer diff --git a/hokkaido.nix b/hokkaido.nix @@ -3,8 +3,6 @@ { imports = [ ./desktop.nix - # k8s - ./kubernetes.nix ]; profiles.laptop.enable = true; profiles.dev = { diff --git a/kubernetes.nix b/kubernetes.nix @@ -1,13 +0,0 @@ -{ pkgs, prefix, ... }: - -{ - home.packages = with pkgs; [ - cri-tools - kail - kubectl - kustomize - knctl - kube-prompt - kubectx - ]; -} diff --git a/minikube.nix b/minikube.nix @@ -1,7 +0,0 @@ -{ pkgs, prefix, ... }: - -{ - home.packages = with pkgs; [ - minikube - ]; -} diff --git a/modules/module-list.nix b/modules/module-list.nix @@ -18,6 +18,7 @@ ./profiles/gaming.nix ./profiles/git.nix ./profiles/i3.nix + ./profiles/kubernetes.nix ./profiles/laptop.nix ./profiles/ssh.nix ./profiles/tmux.nix diff --git a/modules/profiles/kubernetes.nix b/modules/profiles/kubernetes.nix @@ -0,0 +1,46 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.profiles.containers.kubernetes; +in +{ + options = { + profiles.containers.kubernetes = { + enable = mkOption { + default = true; + description = "Enable kubernetes profile"; + type = types.bool; + }; + minikube = { + enable = mkOption { + default = false; + description = "Enable minikube"; + type = types.bool; + }; + package = mkOption { + default = pkgs.minikube; + description = "Minikube package"; + type = types.package; + }; + }; + }; + }; + config = mkIf cfg.enable (mkMerge [ + { + profiles.containers.enable = true; + home.packages = with pkgs; [ + cri-tools + kail + kubectl + kustomize + knctl + kube-prompt + kubectx + ]; + } + (mkIf cfg.minikube.enable { + home.packages = with pkgs; [ cfg.minikube.package ]; + }) + ]); +} diff --git a/shikoku.nix b/shikoku.nix @@ -19,6 +19,8 @@ profiles.containers = { enable = true; docker = true; + kubernetes = { enable = true; minikube.enable = true; }; + #openshift = { enable = true; minishift.enable = true; }; }; programs.vscode.enable = true; home.packages = with pkgs; [ diff --git a/wakasu.nix b/wakasu.nix @@ -18,6 +18,8 @@ profiles.containers = { enable = true; docker = true; + kubernetes = { enable = true; minikube.enable = true; }; + #openshift = { enable = true; minishift.enable = true; }; }; programs.vscode.enable = true; home.packages = with pkgs; [