From d8e16f0b05300831d12454fb55e0303bc0b0fbea Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 23 Jan 2025 20:35:28 -0500 Subject: [PATCH] Do not install kubernetes clients on neelix. --- nix/configuration/hosts/odo/default.nix | 2 + .../roles/kubernetes/default.nix | 62 ++++++++++++------- 2 files changed, 40 insertions(+), 24 deletions(-) diff --git a/nix/configuration/hosts/odo/default.nix b/nix/configuration/hosts/odo/default.nix index 5c83289..a9c21e2 100644 --- a/nix/configuration/hosts/odo/default.nix +++ b/nix/configuration/hosts/odo/default.nix @@ -40,5 +40,7 @@ me.git.config = ./roles/git/files/gitconfig_home; me.graphical = true; me.graphics_card_type = "amd"; + me.kanshi.enable = true; + me.kubernetes.enable = true; me.sway.enable = true; } diff --git a/nix/configuration/roles/kubernetes/default.nix b/nix/configuration/roles/kubernetes/default.nix index a1eb07d..711f41e 100644 --- a/nix/configuration/roles/kubernetes/default.nix +++ b/nix/configuration/roles/kubernetes/default.nix @@ -32,31 +32,45 @@ in { imports = [ ]; - environment.systemPackages = with pkgs; [ - kubectl - kubeswitch - stern - alias_kx - alias_ks - alias_k - alias_ka - alias_kdel - alias_kd - alias_klog - ]; - - environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) { - hideMounts = true; - users.talexander = { - directories = [ - { - directory = ".kube"; - user = "talexander"; - group = "talexander"; - mode = "0750"; - } - ]; + options.me = { + kubernetes.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install kubernetes."; }; }; + config = lib.mkIf config.me.kubernetes.enable ( + lib.mkMerge [ + { + environment.systemPackages = with pkgs; [ + kubectl + kubeswitch + stern + alias_kx + alias_ks + alias_k + alias_ka + alias_kdel + alias_kd + alias_klog + ]; + + environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) { + hideMounts = true; + users.talexander = { + directories = [ + { + directory = ".kube"; + user = "talexander"; + group = "talexander"; + mode = "0750"; + } + ]; + }; + }; + } + ] + ); }