feat(k8s): use konf for kubeconfig control
This commit is contained in:
parent
e88a424bb1
commit
563d8891e4
3 changed files with 29 additions and 17 deletions
30
flake.lock
30
flake.lock
|
@ -111,11 +111,11 @@
|
|||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1679394816,
|
||||
"narHash": "sha256-1V1esJt2YAxsKmRuGuB62RF5vhDAVFDvJXVNhtEO22A=",
|
||||
"lastModified": 1679480702,
|
||||
"narHash": "sha256-npuRD61YmxUPitI1TqKwlxLrU6iGl5E+BPT196LgUDo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e386ec640e16dc91120977285cb8c72c77078164",
|
||||
"rev": "363c46b2480f1b73ec37cf68caac61f5daa82a2e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -131,11 +131,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1679400087,
|
||||
"narHash": "sha256-Cg7SZBhZxJWiFEmsVOnJZSf4H0clqGoiz4mLCgf0Plw=",
|
||||
"lastModified": 1679640835,
|
||||
"narHash": "sha256-ypTzpOsrTQt1uZob+ybzeAac/6MK7kd/8ChZsRJZ+XQ=",
|
||||
"owner": "nekowinston",
|
||||
"repo": "nur",
|
||||
"rev": "1159372173c73a08548f89b8f8a0853bc98efc9a",
|
||||
"rev": "caff3468232640c218a075842839e42d3bf5876f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -146,11 +146,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1679224734,
|
||||
"narHash": "sha256-1Ab3xY7Wgo1h1TNwRt6fp2XjV+KUo+hP1Bolh0KiDJs=",
|
||||
"lastModified": 1679472241,
|
||||
"narHash": "sha256-VK2YDic2NjPvfsuneJCLIrWS38qUfoW8rLLimx0rWXA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "eac7da7b519a5aefe92c33c90b4450a24ebe0ab3",
|
||||
"rev": "9ef6e7727f4c31507627815d4f8679c5841efb00",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -194,11 +194,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1679319606,
|
||||
"narHash": "sha256-wyEMIZB6BnsmJWInEgDZu66hXVMGJEZFl5uDsn27f9M=",
|
||||
"lastModified": 1679553901,
|
||||
"narHash": "sha256-OhmJc18XNIj0wVC4ZoPnCVoY3SGfcPxaeKJOz1WHo5M=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8bc6945b1224a1cfa679d6801580b1054dba1a5c",
|
||||
"rev": "09ad6a72359f6aff0f96ce8e4d1ec2d1271ad15d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -258,11 +258,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1679397472,
|
||||
"narHash": "sha256-HJdIJO2gHL6dRAH5YBZMP3qzvmSuLRtQ+3HL5mS9jKg=",
|
||||
"lastModified": 1679636577,
|
||||
"narHash": "sha256-VITq8l3SCnw/MBuve5VX1SNHcamrYOdGGvHPMwX8HsI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "89adadf2c092d641d9791cc58baeb6432be5bc8d",
|
||||
"rev": "fc32207b8e7def548d5f5c1acb010f8b59df16d4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
dyff
|
||||
gojq
|
||||
jqp
|
||||
konf
|
||||
kubeconform
|
||||
kubectl
|
||||
kubectx
|
||||
kubernetes-helm
|
||||
|
@ -16,12 +18,15 @@
|
|||
velero
|
||||
];
|
||||
|
||||
home.shellAliases.jq = "gojq";
|
||||
home.shellAliases = {
|
||||
jq = "gojq";
|
||||
kcuc = "konf set";
|
||||
kcn = "konf ns";
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
KREW_ROOT = "${config.xdg.dataHome}/krew";
|
||||
KUBECACHEDIR = "${config.xdg.cacheHome}/kube";
|
||||
KUBECONFIG = "${config.xdg.configHome}/kube/config";
|
||||
MINIKUBE_HOME = "${config.xdg.dataHome}/minikube";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -69,7 +69,14 @@ in {
|
|||
for conf in "${functionsDir}"/**/*.zsh; do
|
||||
source "$conf"
|
||||
done
|
||||
|
||||
# WezTerm
|
||||
[[ "$TERM_PROGRAM" == "WezTerm" ]] && TERM=wezterm
|
||||
|
||||
source <(konf-go shellwrapper zsh)
|
||||
source <(konf-go completion zsh)
|
||||
# open last konf on new shell session
|
||||
export KUBECONFIG=$(konf-go --silent set -)
|
||||
'';
|
||||
|
||||
envExtra = ''
|
||||
|
|
Loading…
Reference in a new issue