Add elara kubeconfigs

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-01-06 11:54:08 +02:00
parent 504a8cb06a
commit 569838f90b
8 changed files with 85 additions and 30 deletions

View File

@@ -0,0 +1,20 @@
{
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{ pkgs, ... }:
{
home-manager.users.${user} = {
home.packages = with pkgs; [
kubernetes-helm
kubectl
];
programs.zsh.initExtra = ''
export P10K_EXTRA_RIGHT_PROMPT_ELEMENTS=(
kubecontext
"''${P10K_EXTRA_RIGHT_PROMPT_ELEMENTS[@]}"
)
'';
};
}

View File

@@ -223,6 +223,11 @@
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135 typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130 typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=('*' DEFAULT)
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
##################################[ context: user@hostname ]################################## ##################################[ context: user@hostname ]##################################
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180

View File

@@ -120,6 +120,7 @@ in
./langs/nix ./langs/nix
./langs/python ./langs/python
./langs/svelte ./langs/svelte
./langs/yaml
]; ];
wayland.windowManager.hyprland.settings.bind = [ "$mod, c, exec, ${lib.meta.getExe pkgs.vscode}" ]; wayland.windowManager.hyprland.settings.bind = [ "$mod, c, exec, ${lib.meta.getExe pkgs.vscode}" ];

View File

@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
programs.vscode.extensions =
with pkgs;
with vscode-extensions;
[
redhat.vscode-yaml
];
}

View File

@@ -7,6 +7,7 @@ pkgs.mkShell {
shellHook = '' shellHook = ''
export P10K_EXTRA_RIGHT_PROMPT_ELEMENTS=( export P10K_EXTRA_RIGHT_PROMPT_ELEMENTS=(
node_version node_version
"''${P10K_EXTRA_RIGHT_PROMPT_ELEMENTS[@]}"
) )
''; '';
} }

View File

@@ -15,6 +15,7 @@ pkgs.mkShell {
shellHook = '' shellHook = ''
export P10K_EXTRA_RIGHT_PROMPT_ELEMENTS=( export P10K_EXTRA_RIGHT_PROMPT_ELEMENTS=(
virtualenv virtualenv
"''${P10K_EXTRA_RIGHT_PROMPT_ELEMENTS[@]}"
) )
''; '';
} }

View File

@@ -119,19 +119,21 @@ in
"gpg/personal/pass".sopsFile = ../../../../secrets/personal/secrets.yaml; "gpg/personal/pass".sopsFile = ../../../../secrets/personal/secrets.yaml;
}; };
programs.ssh.matchBlocks = { programs = {
"github.com" = { ssh.matchBlocks = {
hostname = "github.com"; "github.com" = {
user = "git"; hostname = "github.com";
identityFile = "${home}/.ssh/ssh_git_personal_ed25519_key"; user = "git";
extraOptions.StrictHostKeyChecking = "accept-new"; identityFile = "${home}/.ssh/ssh_git_personal_ed25519_key";
extraOptions.StrictHostKeyChecking = "accept-new";
};
}; };
obsidian.vaults."Documents/Obsidian/master".enable = true;
}; };
theme.wallpaper = ../../../../static/wallpapers/clouds.png; theme.wallpaper = ../../../../static/wallpapers/clouds.png;
programs.obsidian.vaults."Documents/Obsidian/master".enable = true;
services.syncthing.settings.folders = { services.syncthing.settings.folders = {
obsidian = { obsidian = {
label = "Obsidian"; label = "Obsidian";

View File

@@ -18,6 +18,7 @@ in
(import ../../../common/configs/user/console/gpg-agent { inherit user home; }) (import ../../../common/configs/user/console/gpg-agent { inherit user home; })
(import ../../../common/configs/user/console/home-manager { inherit user home; }) (import ../../../common/configs/user/console/home-manager { inherit user home; })
(import ../../../common/configs/user/console/imagemagick { inherit user home; }) (import ../../../common/configs/user/console/imagemagick { inherit user home; })
(import ../../../common/configs/user/console/kubernetes { inherit user home; })
(import ../../../common/configs/user/console/libvirt { inherit user home; }) (import ../../../common/configs/user/console/libvirt { inherit user home; })
(import ../../../common/configs/user/console/ncdu { inherit user home; }) (import ../../../common/configs/user/console/ncdu { inherit user home; })
(import ../../../common/configs/user/console/neovim { inherit user home; }) (import ../../../common/configs/user/console/neovim { inherit user home; })
@@ -121,34 +122,49 @@ in
"gpg/sas/key".sopsFile = ../../../../secrets/sas/secrets.yaml; "gpg/sas/key".sopsFile = ../../../../secrets/sas/secrets.yaml;
"gpg/sas/pass".sopsFile = ../../../../secrets/sas/secrets.yaml; "gpg/sas/pass".sopsFile = ../../../../secrets/sas/secrets.yaml;
"kubeconfig/d90270" = {
sopsFile = ../../../../secrets/sas/secrets.yaml;
path = "${home}/.kube/d90270";
};
"kubeconfig/d90271" = {
sopsFile = ../../../../secrets/sas/secrets.yaml;
path = "${home}/.kube/d90271";
};
"kubeconfig/d90272" = {
sopsFile = ../../../../secrets/sas/secrets.yaml;
path = "${home}/.kube/d90272";
};
}; };
programs.ssh.matchBlocks = { programs = {
# Personal ssh.matchBlocks = {
"github.com/karaolidis" = { # Personal
hostname = "github.com"; "github.com/karaolidis" = {
user = "git"; hostname = "github.com";
identityFile = "${home}/.ssh/ssh_git_personal_ed25519_key"; user = "git";
extraOptions.StrictHostKeyChecking = "accept-new"; identityFile = "${home}/.ssh/ssh_git_personal_ed25519_key";
extraOptions.StrictHostKeyChecking = "accept-new";
};
# SAS
"github.com" = {
hostname = "github.com";
user = "git";
identityFile = "${home}/.ssh/ssh_git_sas_ed25519_key";
extraOptions.StrictHostKeyChecking = "accept-new";
};
"gitlab.sas.com" = {
hostname = "gitlab.sas.com";
user = "git";
identityFile = "${home}/.ssh/ssh_git_sas_ed25519_key";
extraOptions.StrictHostKeyChecking = "accept-new";
};
}; };
# SAS obsidian.vaults."Documents/Obsidian/master".enable = true;
"github.com" = {
hostname = "github.com";
user = "git";
identityFile = "${home}/.ssh/ssh_git_sas_ed25519_key";
extraOptions.StrictHostKeyChecking = "accept-new";
};
"gitlab.sas.com" = {
hostname = "gitlab.sas.com";
user = "git";
identityFile = "${home}/.ssh/ssh_git_sas_ed25519_key";
extraOptions.StrictHostKeyChecking = "accept-new";
};
}; };
theme.wallpaper = ../../../../static/wallpapers/snow.jpg; theme.wallpaper = ../../../../static/wallpapers/snow.jpg;
programs.obsidian.vaults."Documents/Obsidian/master".enable = true;
}; };
} }