stuff
This commit is contained in:
@@ -16,7 +16,6 @@ in
|
|||||||
./dock
|
./dock
|
||||||
];
|
];
|
||||||
|
|
||||||
# It me
|
|
||||||
users.users.${user} = {
|
users.users.${user} = {
|
||||||
name = "${user}";
|
name = "${user}";
|
||||||
home = "/Users/${user}";
|
home = "/Users/${user}";
|
||||||
@@ -28,8 +27,7 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
casks = pkgs.callPackage ./casks.nix { };
|
casks = pkgs.callPackage ./casks.nix { };
|
||||||
|
|
||||||
masApps = {
|
masApps = { };
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
@@ -55,19 +53,16 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fully declarative dock using the latest from Nix Store
|
|
||||||
local = {
|
local = {
|
||||||
dock = {
|
dock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
username = user;
|
username = user;
|
||||||
entries = [
|
entries = [
|
||||||
{ path = "/Applications/Safari.app/"; }
|
{ path = "/Applications/Safari.app/"; }
|
||||||
{ path = "/System/Applications/Messages.app/"; }
|
{ path = "/${pkgs.ghostty-bin}/Applications/Ghostty.app/"; }
|
||||||
{ path = "/System/Applications/Notes.app/"; }
|
|
||||||
{ path = "${pkgs.alacritty}/Applications/Alacritty.app/"; }
|
{ path = "${pkgs.alacritty}/Applications/Alacritty.app/"; }
|
||||||
|
{ path = "/System/Applications/Notes.app/"; }
|
||||||
{ path = "/System/Applications/Music.app/"; }
|
{ path = "/System/Applications/Music.app/"; }
|
||||||
{ path = "/System/Applications/Photos.app/"; }
|
|
||||||
{ path = "/System/Applications/Photo Booth.app/"; }
|
|
||||||
{ path = "/System/Applications/System Settings.app/"; }
|
{ path = "/System/Applications/System Settings.app/"; }
|
||||||
{
|
{
|
||||||
path = "${config.users.users.${user}.home}/Downloads";
|
path = "${config.users.users.${user}.home}/Downloads";
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
let
|
let
|
||||||
shared-packages = import ../shared/packages.nix { inherit pkgs; };
|
shared-packages = import ../shared/packages.nix { inherit pkgs; };
|
||||||
in
|
in
|
||||||
shared-packages
|
shared-packages
|
||||||
++ [
|
++ [
|
||||||
dockutil
|
|
||||||
_1password-gui
|
_1password-gui
|
||||||
|
dockutil
|
||||||
raycast
|
raycast
|
||||||
]
|
]
|
||||||
|
|||||||
59
modules/shared/config/config.nu
Normal file
59
modules/shared/config/config.nu
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
$env.PATH = [
|
||||||
|
($env.HOME | path join ".local" "bin"),
|
||||||
|
($env.HOME | path join ".scripts"),
|
||||||
|
"/opt/homebrew/bin"
|
||||||
|
] ++ $env.PATH
|
||||||
|
|
||||||
|
$env.EDITOR = "nvim"
|
||||||
|
$env.VISUAL = $env.EDITOR
|
||||||
|
$env.PAGER = "ov"
|
||||||
|
|
||||||
|
let fish_completer = {|spans|
|
||||||
|
fish --command $"complete '--do-complete=($spans | str replace --all "'" "\\'" | str join ' ')'"
|
||||||
|
| from tsv --flexible --noheaders --no-infer
|
||||||
|
| rename value description
|
||||||
|
| update value {|row|
|
||||||
|
let value = $row.value
|
||||||
|
let need_quote = ['\' ',' '[' ']' '(' ')' ' ' '\t' "'" '"' "`"] | any {$in in $value}
|
||||||
|
if ($need_quote and ($value | path exists)) {
|
||||||
|
let expanded_path = if ($value starts-with ~) {$value | path expand --no-symlink} else {$value}
|
||||||
|
$'"($expanded_path | str replace --all "\"" "\\\"")"'
|
||||||
|
} else {$value}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Nushell
|
||||||
|
# source theme.nu
|
||||||
|
$env.PROMPT_INDICATOR_VI_INSERT = ""
|
||||||
|
$env.PROMPT_INDICATOR_VI_NORMAL = ""
|
||||||
|
$env.config = {
|
||||||
|
show_banner: false
|
||||||
|
edit_mode: vi,
|
||||||
|
completions: {
|
||||||
|
external: {
|
||||||
|
enable: true
|
||||||
|
completer: $fish_completer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$env.LS_COLORS = (vivid generate catppuccin-latte | str trim)
|
||||||
|
$env.RIPGREP_CONFIG_PATH = ($env.HOME | path join ".config" "ripgrep" "config")
|
||||||
|
$env.FZF_COMPLETE = "0"
|
||||||
|
$env.FZF_DEFAULT_OPTS = "
|
||||||
|
--color=bg+:#363A4F,bg:#24273A,spinner:#F4DBD6,hl:#ED8796
|
||||||
|
--color=fg:#CAD3F5,header:#ED8796,info:#C6A0F6,pointer:#F4DBD6
|
||||||
|
--color=marker:#B7BDF8,fg+:#CAD3F5,prompt:#C6A0F6,hl+:#ED8796
|
||||||
|
--color=selected-bg:#494D64
|
||||||
|
--color=border:#363A4F,label:#CAD3F5"
|
||||||
|
|
||||||
|
alias b = bat
|
||||||
|
alias d = docker
|
||||||
|
alias ld = lazydocker
|
||||||
|
alias lg = lazygit
|
||||||
|
alias m = mise
|
||||||
|
alias mr = mise run
|
||||||
|
alias v = nvim
|
||||||
|
alias vim = nvim
|
||||||
|
alias dcu = docker compose up -d
|
||||||
|
alias dcud = docker compose -f docker-compose.dev.yml up -d
|
||||||
@@ -1,287 +0,0 @@
|
|||||||
'builtin' 'local' '-a' 'p10k_config_opts'
|
|
||||||
[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases')
|
|
||||||
[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob')
|
|
||||||
[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand')
|
|
||||||
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
|
|
||||||
|
|
||||||
() {
|
|
||||||
emulate -L zsh
|
|
||||||
setopt no_unset
|
|
||||||
|
|
||||||
autoload -Uz is-at-least && is-at-least 5.1 || return
|
|
||||||
|
|
||||||
# Unset all configuration options.
|
|
||||||
unset -m 'POWERLEVEL9K_*'
|
|
||||||
|
|
||||||
# Left prompt segments.
|
|
||||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
|
||||||
dir # current directory
|
|
||||||
vcs # git status
|
|
||||||
context # user@host
|
|
||||||
command_execution_time # previous command duration
|
|
||||||
virtualenv # python virtual environment
|
|
||||||
prompt_char # prompt symbol
|
|
||||||
)
|
|
||||||
|
|
||||||
# Right prompt segments.
|
|
||||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
|
||||||
nix_shell_with_name
|
|
||||||
)
|
|
||||||
|
|
||||||
# Defines character set used by powerlevel10k.
|
|
||||||
typeset -g POWERLEVEL9K_MODE=nerdfont-complete
|
|
||||||
|
|
||||||
# When set to `moderate`, some icons will have an extra space after them. This is meant to avoid
|
|
||||||
# icon overlap when using non-monospace fonts. When set to `none`, spaces are not added.
|
|
||||||
typeset -g POWERLEVEL9K_ICON_PADDING=none
|
|
||||||
|
|
||||||
# Basic style options that define the overall prompt look.
|
|
||||||
typeset -g POWERLEVEL9K_BACKGROUND= # transparent background
|
|
||||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace
|
|
||||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space
|
|
||||||
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol
|
|
||||||
typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION= # no segment icons
|
|
||||||
|
|
||||||
# Add an empty line before each prompt except the first. This doesn't emulate the bug
|
|
||||||
# in Pure that makes prompt drift down whenever you use the ALT-C binding from fzf or similar.
|
|
||||||
typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
|
|
||||||
|
|
||||||
# Green prompt symbol if the last command succeeded.
|
|
||||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=002
|
|
||||||
# Red prompt symbol if the last command failed.
|
|
||||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=001
|
|
||||||
# Default prompt symbol.
|
|
||||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
|
|
||||||
# Prompt symbol in command vi mode.
|
|
||||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
|
|
||||||
# Prompt symbol in visual vi mode is the same as in command mode.
|
|
||||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='❮'
|
|
||||||
# Prompt symbol in overwrite vi mode is the same as in command mode.
|
|
||||||
typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=false
|
|
||||||
|
|
||||||
# Grey Python Virtual Environment.
|
|
||||||
typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=007
|
|
||||||
# Don't show Python version.
|
|
||||||
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
|
|
||||||
typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
|
|
||||||
|
|
||||||
# Blue current directory.
|
|
||||||
typeset -g POWERLEVEL9K_DIR_FOREGROUND=blue
|
|
||||||
|
|
||||||
# Context format when root: user@host. The first part white, the rest grey.
|
|
||||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%7F%n%f%007F@%m%f'
|
|
||||||
# Context format when not root: user@host. The whole thing grey.
|
|
||||||
typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%007F%n@%m%f'
|
|
||||||
# Don't show context unless root or in SSH.
|
|
||||||
typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION=
|
|
||||||
|
|
||||||
# Show previous command duration only if it's >= 5s.
|
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5
|
|
||||||
# Don't show fractional seconds. Thus, 7s rather than 7.3s.
|
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
|
|
||||||
# Duration format: 1d 2h 3m 4s.
|
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
|
|
||||||
# Yellow previous command duration.
|
|
||||||
typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=007
|
|
||||||
|
|
||||||
# Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 '
|
|
||||||
|
|
||||||
# Untracked files icon. It's really a question mark, your font isn't broken.
|
|
||||||
# Change the value of this parameter to show a different icon.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
|
|
||||||
|
|
||||||
# Version control system colors.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=2
|
|
||||||
typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=3
|
|
||||||
typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=2
|
|
||||||
typeset -g POWERLEVEL9K_VCS_CONFLICTED_FOREGROUND=3
|
|
||||||
typeset -g POWERLEVEL9K_VCS_LOADING_FOREGROUND=8
|
|
||||||
|
|
||||||
# Nix shell color.
|
|
||||||
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0
|
|
||||||
typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4
|
|
||||||
|
|
||||||
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
|
|
||||||
typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
|
|
||||||
|
|
||||||
function prompt_nix_shell_with_name() {
|
|
||||||
if [[ -n "${IN_NIX_SHELL-}" ]]; then
|
|
||||||
if [[ "${name-nix-shell}" != nix-shell ]] && [ "${name-shell}" != shell ]; then
|
|
||||||
p10k segment -b 4 -f 15 -r -i NIX_SHELL_ICON -t "$name"
|
|
||||||
else
|
|
||||||
p10k segment -b 4 -f 15 -r -i NIX_SHELL_ICON
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# VCS_STATUS_* parameters are set by gitstatus plugin. See reference:
|
|
||||||
# https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.
|
|
||||||
function my_git_formatter() {
|
|
||||||
emulate -L zsh
|
|
||||||
|
|
||||||
if [[ -n $P9K_CONTENT ]]; then
|
|
||||||
# If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from
|
|
||||||
# gitstatus plugin). VCS_STATUS_* parameters are not available in this case.
|
|
||||||
typeset -g my_git_format=$P9K_CONTENT
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (( $1 )); then
|
|
||||||
# Styling for up-to-date Git status.
|
|
||||||
local meta='%f' # default foreground
|
|
||||||
local clean='%002F' # green foreground
|
|
||||||
local modified='%003F' # yellow foreground
|
|
||||||
local untracked='%004F' # blue foreground
|
|
||||||
local conflicted='%001F' # red foreground
|
|
||||||
else
|
|
||||||
# Styling for incomplete and stale Git status.
|
|
||||||
local meta='%244F' # grey foreground
|
|
||||||
local clean='%244F' # grey foreground
|
|
||||||
local modified='%244F' # grey foreground
|
|
||||||
local untracked='%244F' # grey foreground
|
|
||||||
local conflicted='%244F' # grey foreground
|
|
||||||
fi
|
|
||||||
|
|
||||||
local res
|
|
||||||
|
|
||||||
if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
|
|
||||||
local branch=${(V)VCS_STATUS_LOCAL_BRANCH}
|
|
||||||
|
|
||||||
# If local branch name is at most 32 characters long, show it in full.
|
|
||||||
# Otherwise show the first 12 … the last 12.
|
|
||||||
(( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
|
|
||||||
|
|
||||||
if (( VCS_STATUS_HAS_CONFLICTED)); then
|
|
||||||
res+="${conflicted}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
|
|
||||||
else
|
|
||||||
if (( VCS_STATUS_HAS_STAGED || VCS_STATUS_HAS_UNSTAGED )); then
|
|
||||||
res+="${modified}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
|
|
||||||
else
|
|
||||||
if (( VCS_STATUS_HAS_UNTRACKED )); then
|
|
||||||
res+="${untracked}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
|
|
||||||
else
|
|
||||||
res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n $VCS_STATUS_TAG
|
|
||||||
# Show tag only if not on a branch.
|
|
||||||
&& -z $VCS_STATUS_LOCAL_BRANCH # <-- this line
|
|
||||||
]]; then
|
|
||||||
local tag=${(V)VCS_STATUS_TAG}
|
|
||||||
# If tag name is at most 32 characters long, show it in full.
|
|
||||||
# Otherwise show the first 12 … the last 12.
|
|
||||||
(( $#tag > 32 )) && tag[13,-13]="…" # <-- this line
|
|
||||||
res+="${meta}#${clean}${tag//\%/%%}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Display the current Git commit if there is no branch and no tag.
|
|
||||||
# Tip: To always display the current Git commit, delete the next line.
|
|
||||||
[[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line
|
|
||||||
res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
|
|
||||||
|
|
||||||
# Show tracking branch name if it differs from local branch.
|
|
||||||
if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
|
|
||||||
res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
typeset -g my_git_format=$res
|
|
||||||
}
|
|
||||||
|
|
||||||
functions -M my_git_formatter 2>/dev/null
|
|
||||||
|
|
||||||
# Don't count the number of unstaged, untracked and conflicted files in Git repositories with
|
|
||||||
# more than this many files in the index. Negative value means infinity.
|
|
||||||
#
|
|
||||||
# If you are working in Git repositories with tens of millions of files and seeing performance
|
|
||||||
# sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output
|
|
||||||
# of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's
|
|
||||||
# config: `git config bash.showDirtyState false`.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1
|
|
||||||
|
|
||||||
# Don't show Git status in prompt for repositories whose workdir matches this pattern.
|
|
||||||
# For example, if set to '~', the Git repository at $HOME/.git will be ignored.
|
|
||||||
# Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'
|
|
||||||
|
|
||||||
# Disable the default Git status formatting.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
|
|
||||||
|
|
||||||
# Install our own Git status formatter.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'
|
|
||||||
typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'
|
|
||||||
|
|
||||||
# Enable counters for staged, unstaged, etc.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
|
|
||||||
|
|
||||||
# Icon color.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=007
|
|
||||||
typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=008
|
|
||||||
|
|
||||||
# Show status of repositories of these types. You can add svn and/or hg if you are
|
|
||||||
# using them. If you do, your prompt may become slow even when your current directory
|
|
||||||
# isn't in an svn or hg reposotiry.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
|
|
||||||
|
|
||||||
# These settings are used for repositories other than Git or when gitstatusd fails and
|
|
||||||
# Powerlevel10k has to fall back to using vcs_info.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=002
|
|
||||||
typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=004
|
|
||||||
typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=003
|
|
||||||
|
|
||||||
##########################[ end git configuration ]###########################
|
|
||||||
|
|
||||||
# Don't wait for Git status even for a millisecond, so that prompt always updates
|
|
||||||
# asynchronously when Git state changes.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0
|
|
||||||
|
|
||||||
# Cyan ahead/behind arrows.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=cyan
|
|
||||||
|
|
||||||
# Don't show remote branch, current tag or stashes.
|
|
||||||
# typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind)
|
|
||||||
|
|
||||||
# When in detached HEAD state, show @commit where branch normally goes.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@'
|
|
||||||
|
|
||||||
# Don't show staged, unstaged, untracked indicators.
|
|
||||||
# typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON=$'\b'
|
|
||||||
|
|
||||||
# Show '*' when there are staged, unstaged or untracked files.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*'
|
|
||||||
|
|
||||||
# Show '⇣' if local branch is behind remote.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON='⇣'
|
|
||||||
|
|
||||||
# Show '⇡' if local branch is ahead of remote.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON='⇡'
|
|
||||||
|
|
||||||
# Don't show the number of commits next to the ahead/behind arrows.
|
|
||||||
typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1
|
|
||||||
|
|
||||||
# Remove space between '⇣' and '⇡'.
|
|
||||||
# typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${P9K_CONTENT/⇣* ⇡/⇣⇡}'
|
|
||||||
|
|
||||||
# Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
|
|
||||||
# when accepting a command line. Supported values:
|
|
||||||
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off
|
|
||||||
|
|
||||||
# Instant prompt mode.
|
|
||||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
|
|
||||||
|
|
||||||
# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
|
|
||||||
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
|
|
||||||
# can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you
|
|
||||||
# really need it.
|
|
||||||
typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
|
|
||||||
|
|
||||||
# If p10k is already loaded, reload configuration.
|
|
||||||
# This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
|
|
||||||
(( ! $+functions[p10k] )) || p10k reload
|
|
||||||
}
|
|
||||||
|
|
||||||
(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
|
|
||||||
'builtin' 'unset' 'p10k_config_opts'
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config = {
|
config = {
|
||||||
|
|||||||
@@ -11,63 +11,124 @@ let
|
|||||||
email = "christoph@schmatzler.com";
|
email = "christoph@schmatzler.com";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
ghostty = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.ghostty-bin;
|
||||||
|
settings = {
|
||||||
|
command = "${pkgs.nushell}/bin/nu";
|
||||||
|
theme = "catppuccin-latte";
|
||||||
|
window-padding-x = 8;
|
||||||
|
window-padding-y = 2;
|
||||||
|
window-padding-balance = true;
|
||||||
|
font-family = "Iosevka";
|
||||||
|
font-size = 15.5;
|
||||||
|
font-feature = [
|
||||||
|
"-calt"
|
||||||
|
"-dlig"
|
||||||
|
];
|
||||||
|
cursor-style = "block";
|
||||||
|
mouse-hide-while-typing = true;
|
||||||
|
mouse-scroll-multiplier = 1.25;
|
||||||
|
shell-integration = "detect";
|
||||||
|
shell-integration-features = "no-cursor";
|
||||||
|
|
||||||
|
keybind = [
|
||||||
|
"global:ctrl+shift+space=toggle_quick_terminal"
|
||||||
|
"shift+enter=text:\\n"
|
||||||
|
"ctrl+one=goto_tab:1"
|
||||||
|
"ctrl+two=goto_tab:2"
|
||||||
|
"ctrl+three=goto_tab:3"
|
||||||
|
"ctrl+four=goto_tab:4"
|
||||||
|
"ctrl+five=goto_tab:5"
|
||||||
|
"ctrl+six=goto_tab:6"
|
||||||
|
"ctrl+seven=goto_tab:7"
|
||||||
|
"ctrl+eight=goto_tab:8"
|
||||||
|
"ctrl+nine=goto_tab:9"
|
||||||
|
"ctrl+left=previous_tab"
|
||||||
|
"ctrl+right=next_tab"
|
||||||
|
"ctrl+h=previous_tab"
|
||||||
|
"ctrl+l=next_tab"
|
||||||
|
"ctrl+shift+left=goto_split:left"
|
||||||
|
"ctrl+shift+right=goto_split:right"
|
||||||
|
"ctrl+shift+h=goto_split:left"
|
||||||
|
"ctrl+shift+j=goto_split:down"
|
||||||
|
"ctrl+shift+k=goto_split:up"
|
||||||
|
"ctrl+shift+l=goto_split:right"
|
||||||
|
"ctrl+shift+enter=new_split:right"
|
||||||
|
"ctrl+t=new_tab"
|
||||||
|
"ctrl+w=close_tab"
|
||||||
|
"ctrl+shift+w=close_surface"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
zsh = {
|
zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autocd = false;
|
};
|
||||||
cdpath = [ "~/Projects" ];
|
|
||||||
plugins = [
|
nushell = {
|
||||||
{
|
enable = true;
|
||||||
name = "powerlevel10k";
|
configFile.source = ./.../config/config.nu;
|
||||||
src = pkgs.zsh-powerlevel10k;
|
};
|
||||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
|
||||||
}
|
starship = {
|
||||||
{
|
enable = true;
|
||||||
name = "powerlevel10k-config";
|
enableNushellIntegration = true;
|
||||||
src = lib.cleanSource ./config;
|
settings = {
|
||||||
file = "p10k.zsh";
|
add_newline = true;
|
||||||
}
|
command_timeout = 750;
|
||||||
|
|
||||||
|
format = lib.concatStrings [
|
||||||
|
"$directory"
|
||||||
|
"$\{custom.jj\}"
|
||||||
|
"$line_break"
|
||||||
|
"$character"
|
||||||
];
|
];
|
||||||
initContent = lib.mkBefore ''
|
|
||||||
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
|
|
||||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
||||||
. /nix/var/nix/profiles/default/etc/profile.d/nix.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define variables for directories
|
character = {
|
||||||
export PATH=$HOME/.pnpm-packages/bin:$HOME/.pnpm-packages:$PATH
|
success_symbol = "[❯](bold green)";
|
||||||
export PATH=$HOME/.npm-packages/bin:$HOME/bin:$PATH
|
error_symbol = "[❯](bold red)";
|
||||||
export PATH=$HOME/.local/share/bin:$PATH
|
};
|
||||||
|
|
||||||
# Remove history data we don't want to see
|
custom.jj = {
|
||||||
export HISTIGNORE="pwd:ls:cd"
|
ignore_timeout = true;
|
||||||
|
description = "The current jj status";
|
||||||
|
detect_folders = [ ".jj" ];
|
||||||
|
symbol = "🥋 ";
|
||||||
|
command = lib.concatStrings [
|
||||||
|
"jj log --revisions @ --no-graph --ignore-working-copy --color always --limit 1 --template '"
|
||||||
|
"separate(\" \","
|
||||||
|
" change_id.shortest(4),"
|
||||||
|
" bookmarks,"
|
||||||
|
" \"|\","
|
||||||
|
" concat("
|
||||||
|
" if(conflict, \"💥\"),"
|
||||||
|
" if(divergent, \"🚧\"),"
|
||||||
|
" if(hidden, \"👻\"),"
|
||||||
|
" if(immutable, \"🔒\"),"
|
||||||
|
" ),"
|
||||||
|
" raw_escape_sequence(\"\\x1b[1;32m\") ++ if(empty, \"(empty)\"),"
|
||||||
|
" raw_escape_sequence(\"\\x1b[1;32m\") ++ coalesce("
|
||||||
|
" truncate_end(29, description.first_line(), \"…\"),"
|
||||||
|
" \"(no description set)\","
|
||||||
|
" ) ++ raw_escape_sequence(\"\\x1b[0m\"),"
|
||||||
|
")"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Ripgrep alias
|
git_state = {
|
||||||
alias search=rg -p --glob '!node_modules/*' $@
|
disabled = true;
|
||||||
|
};
|
||||||
# Emacs is my editor
|
git_commit = {
|
||||||
export ALTERNATE_EDITOR=""
|
disabled = true;
|
||||||
export EDITOR="emacsclient -t"
|
};
|
||||||
export VISUAL="emacsclient -c -a emacs"
|
git_metrics = {
|
||||||
|
disabled = true;
|
||||||
e() {
|
};
|
||||||
emacsclient -t "$@"
|
git_branch = {
|
||||||
}
|
disabled = true;
|
||||||
|
};
|
||||||
# nix shortcuts
|
};
|
||||||
shell() {
|
|
||||||
nix-shell '<nixpkgs>' -A "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
# pnpm is a javascript package manager
|
|
||||||
alias pn=pnpm
|
|
||||||
alias px=pnpx
|
|
||||||
|
|
||||||
# Use difftastic, syntax-aware diffing
|
|
||||||
alias diff=difft
|
|
||||||
|
|
||||||
# Always color ls and group directories
|
|
||||||
alias ls='ls --color=auto'
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
git = {
|
git = {
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ with pkgs;
|
|||||||
docker-compose
|
docker-compose
|
||||||
gnupg
|
gnupg
|
||||||
iosevka
|
iosevka
|
||||||
jujutsu
|
|
||||||
jjui
|
jjui
|
||||||
nixfmt
|
|
||||||
jq
|
jq
|
||||||
|
jujutsu
|
||||||
killall
|
killall
|
||||||
libfido2
|
libfido2
|
||||||
|
nixfmt
|
||||||
nodejs_24
|
nodejs_24
|
||||||
openssh
|
openssh
|
||||||
ripgrep
|
ripgrep
|
||||||
@@ -24,5 +24,4 @@ with pkgs;
|
|||||||
unzip
|
unzip
|
||||||
wget
|
wget
|
||||||
zip
|
zip
|
||||||
zsh-powerlevel10k
|
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user