home

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

commit 88d8c9f4dc7073647e3469ff6d6e53836eeff19f
parent d82c0215378568bb28a5e4e7e8942e4e88e76d1c
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Thu,  1 Nov 2018 17:36:47 +0100

profiles.containers: add openshift profile

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

Diffstat:
Mmodules/module-list.nix | 1+
Mmodules/profiles/kubernetes.nix | 9+++++++--
Amodules/profiles/openshift.nix | 45+++++++++++++++++++++++++++++++++++++++++++++
Dopenshift.nix | 10----------
Mshikoku.nix | 7++++++-
Mwakasu.nix | 3+--
6 files changed, 60 insertions(+), 15 deletions(-)

diff --git a/modules/module-list.nix b/modules/module-list.nix @@ -21,6 +21,7 @@ ./profiles/i3.nix ./profiles/kubernetes.nix ./profiles/laptop.nix + ./profiles/openshift.nix ./profiles/ssh.nix ./profiles/tmux.nix ./profiles/zsh.nix diff --git a/modules/profiles/kubernetes.nix b/modules/profiles/kubernetes.nix @@ -32,7 +32,6 @@ in home.packages = with pkgs; [ cri-tools kail - kubectl kustomize knctl kube-prompt @@ -40,7 +39,13 @@ in ]; } (mkIf cfg.minikube.enable { - home.packages = with pkgs; [ cfg.minikube.package ]; + home.packages = with pkgs; [ + cfg.minikube.package + docker-machine-kvm2 + ]; + }) + (mkIf (!config.profiles.containers.openshift.enable) { + home.packages = with pkgs; [ kubectl ]; }) ]); } diff --git a/modules/profiles/openshift.nix b/modules/profiles/openshift.nix @@ -0,0 +1,45 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.profiles.containers.openshift; +in +{ + options = { + profiles.containers.openshift = { + enable = mkOption { + default = true; + description = "Enable openshift profile"; + type = types.bool; + }; + minishift = { + enable = mkOption { + default = false; + description = "Enable minishift"; + type = types.bool; + }; + package = mkOption { + default = pkgs.minishift; + description = "Minishift package"; + type = types.package; + }; + }; + }; + }; + config = mkIf cfg.enable (mkMerge [ + { + profiles.containers.kubernetes.enable = true; + home.packages = with pkgs; [ + s2i + openshift + ]; + } + (mkIf cfg.minishift.enable { + home.packages = with pkgs; [ + cfg.minishift.package + docker-machine-kvm + docker-machine-kvm2 + ]; + }) + ]); +} diff --git a/openshift.nix b/openshift.nix @@ -1,10 +0,0 @@ -{ pkgs, ... }: - -{ - home.packages = with pkgs; [ - docker-machine-kvm - docker-machine-kvm2 - s2i - openshift - ]; -} diff --git a/shikoku.nix b/shikoku.nix @@ -21,9 +21,14 @@ enable = true; docker = true; kubernetes = { enable = true; minikube.enable = true; }; - #openshift = { enable = true; minishift.enable = true; }; + openshift = { enable = true; minishift.enable = true; }; }; programs.vscode.enable = true; + services.shairport-sync.enable = true; + + home.file."src/github.com/knative/.envrc".source = ./projects/nix.envrc; + home.file."src/github.com/knative/default.nix".source = ./projects/knative/default.nix; + home.packages = with pkgs; [ google-chrome obs-studio # screencast diff --git a/wakasu.nix b/wakasu.nix @@ -4,7 +4,6 @@ imports = [ ./desktop.nix ./devops.nix - ./openshift.nix ]; profiles.laptop.enable = true; profiles.dev = { @@ -20,7 +19,7 @@ enable = true; docker = true; kubernetes = { enable = true; minikube.enable = true; }; - #openshift = { enable = true; minishift.enable = true; }; + openshift = { enable = true; minishift.enable = true; }; }; programs.vscode.enable = true; home.packages = with pkgs; [