From 09b7d9b3cb1c12978857a05bf59ed1185b153274 Mon Sep 17 00:00:00 2001 From: Bryton Hall Date: Sun, 10 Dec 2023 10:19:59 -0500 Subject: [PATCH] default kubeconfig to $HOME/.kube/config --- CHANGELOG.md | 1 + modules/k8s.nix | 2 +- pkgs/kubenix.nix | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9279f54..c0c3061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- default `kubernetes.kubeconfig` to `$HOME/.kube/config` - removed local `kubectl` and `kubernetes` packages in lieu of those from nixpkgs ## [0.2.0] - 2023-07-07 diff --git a/modules/k8s.nix b/modules/k8s.nix index 601ed2e..296fb0a 100644 --- a/modules/k8s.nix +++ b/modules/k8s.nix @@ -298,7 +298,7 @@ in kubeconfig = mkOption { description = "path to kubeconfig file (default: use $KUBECONFIG)"; type = types.nullOr types.str; - default = null; + default = "$HOME/.kube/config"; example = "/run/secrets/kubeconfig"; }; diff --git a/pkgs/kubenix.nix b/pkgs/kubenix.nix index 8cf93d5..fe5e670 100644 --- a/pkgs/kubenix.nix +++ b/pkgs/kubenix.nix @@ -14,7 +14,7 @@ let in runCommand "kubenix" { - kubeconfig = kubernetes.kubeconfig or ""; + inherit (kubernetes) kubeconfig; result = kubernetes.result or ""; # kubectl does some parsing which removes the -I flag so