Add go devshell

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-01-06 13:44:43 +02:00
parent 249c089718
commit 31f3364f06
14 changed files with 111 additions and 34 deletions

View File

@@ -22,9 +22,6 @@
status
command_execution_time
background_jobs
direnv
ranger
vim_shell
nix_shell
per_directory_history
"${P10K_EXTRA_RIGHT_PROMPT_ELEMENTS[@]}"
@@ -228,6 +225,12 @@
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}'
################[ goenv: go environment (https://github.com/syndbg/goenv) ]################
typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37
typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)
typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=true
typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true
##################################[ context: user@hostname ]##################################
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180

View File

@@ -10,6 +10,8 @@
};
home-manager.users.${user} = {
imports = [ ./options.nix ];
programs.zsh = {
enable = true;
dotDir = ".config/zsh";

View File

@@ -0,0 +1,25 @@
{ config, lib, ... }:
let
cfg = config.programs.zsh;
in
{
options.programs.zsh =
with lib;
with types;
{
p10k.extraRightPromptElements = mkOption {
type = listOf str;
default = [ ];
description = "Extra elements to display on the right side of the prompt.";
};
};
config.programs.zsh =
with lib;
with cfg;
{
initExtra = ''
export P10K_EXTRA_RIGHT_PROMPT_ELEMENTS=(${strings.concatStringsSep " " cfg.p10k.extraRightPromptElements})
'';
};
}