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..a89e44d 100644 --- a/pkgs/kubenix.nix +++ b/pkgs/kubenix.nix @@ -14,7 +14,6 @@ let in runCommand "kubenix" { - kubeconfig = kubernetes.kubeconfig or ""; result = kubernetes.result or ""; # kubectl does some parsing which removes the -I flag so @@ -34,7 +33,7 @@ runCommand "kubenix" cat < $out/bin/kubenix set -uo pipefail - export KUBECONFIG=$kubeconfig + export KUBECONFIG=${kubernetes.kubeconfig} export KUBECTL_EXTERNAL_DIFF=$diff function _help() {