mirror of
https://codeberg.org/hyperreal/home-manager
synced 2024-11-01 15:23:06 +01:00
Update
This commit is contained in:
parent
7c5a349b54
commit
eb04ae5fc7
@ -1,115 +1,115 @@
|
|||||||
# Sets user-defined palette
|
"$schema" = 'https://starship.rs/config-schema.json'
|
||||||
palette = "catppuccin_mocha"
|
|
||||||
|
|
||||||
format = """$time$container$directory$all$line_break$username$hostname$character"""
|
## PROMPT FORMAT
|
||||||
right_format = """$cmd_duration$jobs$status"""
|
format = """$time$container$directory$all$cmd_duration$jobs$status$line_break$username$hostname$character"""
|
||||||
|
|
||||||
|
# # PALETTE
|
||||||
|
palette = 'catppuccin_mocha'
|
||||||
|
|
||||||
|
[palettes.catppuccin_mocha]
|
||||||
|
rosewater = '#f5e0dc'
|
||||||
|
flamingo = '#f2cdcd'
|
||||||
|
pink = '#f5c2e7'
|
||||||
|
mauve = '#cba6f7'
|
||||||
|
red = '#f38ba8'
|
||||||
|
maroon = '#eba0ac'
|
||||||
|
peach = '#fab387'
|
||||||
|
yellow = '#f9e2af'
|
||||||
|
green = '#a6e3a1'
|
||||||
|
teal = '#94e2d5'
|
||||||
|
sky = '#89dceb'
|
||||||
|
sapphire = '#74c7ec'
|
||||||
|
blue = '#89b4fa'
|
||||||
|
lavender = '#b4befe'
|
||||||
|
text = '#cdd6f4'
|
||||||
|
subtext1 = '#bac2de'
|
||||||
|
subtext0 = '#a6adc8'
|
||||||
|
overlay2 = '#9399b2'
|
||||||
|
overlay1 = '#7f849c'
|
||||||
|
overlay0 = '#6c7086'
|
||||||
|
surface2 = '#585b70'
|
||||||
|
surface1 = '#45475a'
|
||||||
|
surface0 = '#313244'
|
||||||
|
base = '#1e1e2e'
|
||||||
|
mantle = '#181825'
|
||||||
|
crust = '#11111b'
|
||||||
|
|
||||||
|
## LEFT SIDE - FIRST LINE
|
||||||
[time]
|
[time]
|
||||||
disabled = false
|
disabled = false
|
||||||
format = '[\[ $time \]]($style) '
|
format = '[$time]($style) '
|
||||||
time_format = "%T"
|
time_format = '%T'
|
||||||
style = "bold peach"
|
style = 'bold peach'
|
||||||
|
|
||||||
[username]
|
|
||||||
format = "[$user]($style)@"
|
|
||||||
style_user = "red"
|
|
||||||
style_root = "bold red"
|
|
||||||
show_always = true
|
|
||||||
|
|
||||||
# Second param
|
|
||||||
[hostname]
|
|
||||||
format = "[$hostname]($style)"
|
|
||||||
style = "lavender"
|
|
||||||
trim_at = ".local"
|
|
||||||
ssh_only = false
|
|
||||||
disabled = false
|
|
||||||
|
|
||||||
# Third param
|
|
||||||
[directory]
|
[directory]
|
||||||
style = "subtext0"
|
style = 'subtext0'
|
||||||
truncation_length = 8
|
truncation_length = 8
|
||||||
truncate_to_repo = true
|
truncate_to_repo = true
|
||||||
truncation_symbol = "repo: "
|
truncation_symbol = 'repo: '
|
||||||
|
|
||||||
|
[docker_context]
|
||||||
|
symbol = 'docker: '
|
||||||
|
format = '[$symbol$context]($style)'
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
symbol = ' '
|
||||||
|
|
||||||
# Before all the version info (python, nodejs, php, etc.)
|
|
||||||
[git_status]
|
[git_status]
|
||||||
style = "text"
|
style = 'text'
|
||||||
ahead = "⇡${count}"
|
ahead = '⇡${count}'
|
||||||
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
|
diverged = '⇕⇡${ahead_count}⇣${behind_count}'
|
||||||
behind = "⇣${count}"
|
behind = '⇣${count}'
|
||||||
deleted = "x"
|
deleted = 'x'
|
||||||
|
|
||||||
[container]
|
[golang]
|
||||||
style = "bold pink"
|
symbol = 'go: '
|
||||||
format = "[$symbol \\[ $name \\]]($style) "
|
format = '[$symbol($version )($style)'
|
||||||
|
|
||||||
|
[nix_shell]
|
||||||
|
symbol = 'nix: '
|
||||||
|
format = '[$symbol$state(\($name\))]($style)'
|
||||||
|
|
||||||
|
[nodejs]
|
||||||
|
symbol = 'node: '
|
||||||
|
format = '[$symbol($version)]($style)'
|
||||||
|
|
||||||
|
[python]
|
||||||
|
symbol = 'py: '
|
||||||
|
format = '[${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
|
||||||
|
|
||||||
|
[rust]
|
||||||
|
symbol = 'rust: '
|
||||||
|
format = '[$symbol($version)]($style)'
|
||||||
|
|
||||||
# Last param in the first line/row
|
|
||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
min_time = 1
|
min_time = 1
|
||||||
style = "yellow"
|
style = 'yellow'
|
||||||
format = '\[duration: [$duration]($style)\] '
|
format = 'duration: [$duration]($style) '
|
||||||
disabled = false
|
disabled = false
|
||||||
|
|
||||||
# Prompt: param 2
|
|
||||||
[character]
|
|
||||||
format = '$symbol '
|
|
||||||
success_symbol = ' [➜](bold teal)'
|
|
||||||
error_symbol = ' [➜](bold red)'
|
|
||||||
vimcmd_symbol = ' [V](bold green)'
|
|
||||||
|
|
||||||
# SYMBOLS
|
|
||||||
[status]
|
[status]
|
||||||
format = '\[exit status: [$status = $common_meaning]($style)\]'
|
format = 'exit status: [$status = $common_meaning]($style) '
|
||||||
disabled = false
|
disabled = false
|
||||||
style = "bold red"
|
style = 'bold red'
|
||||||
recognize_signal_code = true
|
recognize_signal_code = true
|
||||||
map_symbol = true
|
map_symbol = true
|
||||||
|
|
||||||
[docker_context]
|
## LEFT SIDE - SECOND LINE
|
||||||
symbol = " "
|
[username]
|
||||||
|
format = '[$user]($style)@'
|
||||||
|
style_user = 'red'
|
||||||
|
style_root = 'bold red'
|
||||||
|
show_always = true
|
||||||
|
|
||||||
[git_branch]
|
[hostname]
|
||||||
symbol = " "
|
format = '[$hostname]($style)'
|
||||||
|
style = 'lavender'
|
||||||
|
trim_at = '.local'
|
||||||
|
ssh_only = false
|
||||||
|
disabled = false
|
||||||
|
|
||||||
[golang]
|
[character]
|
||||||
symbol = " "
|
format = ' [$symbol]($style) '
|
||||||
|
success_symbol = '[➜](bold teal)'
|
||||||
[nodejs]
|
error_symbol = '[➜](bold red)'
|
||||||
symbol = " "
|
vimcmd_symbol = '[V](bold green)'
|
||||||
|
|
||||||
[package]
|
|
||||||
symbol = " "
|
|
||||||
|
|
||||||
[python]
|
|
||||||
symbol = " "
|
|
||||||
|
|
||||||
[rust]
|
|
||||||
symbol = " "
|
|
||||||
|
|
||||||
[palettes.catppuccin_mocha]
|
|
||||||
rosewater = "#f5e0dc"
|
|
||||||
flamingo = "#f2cdcd"
|
|
||||||
pink = "#f5c2e7"
|
|
||||||
mauve = "#cba6f7"
|
|
||||||
red = "#f38ba8"
|
|
||||||
maroon = "#eba0ac"
|
|
||||||
peach = "#fab387"
|
|
||||||
yellow = "#f9e2af"
|
|
||||||
green = "#a6e3a1"
|
|
||||||
teal = "#94e2d5"
|
|
||||||
sky = "#89dceb"
|
|
||||||
sapphire = "#74c7ec"
|
|
||||||
blue = "#89b4fa"
|
|
||||||
lavender = "#b4befe"
|
|
||||||
text = "#cdd6f4"
|
|
||||||
subtext1 = "#bac2de"
|
|
||||||
subtext0 = "#a6adc8"
|
|
||||||
overlay2 = "#9399b2"
|
|
||||||
overlay1 = "#7f849c"
|
|
||||||
overlay0 = "#6c7086"
|
|
||||||
surface2 = "#585b70"
|
|
||||||
surface1 = "#45475a"
|
|
||||||
surface0 = "#313244"
|
|
||||||
base = "#1e1e2e"
|
|
||||||
mantle = "#181825"
|
|
||||||
crust = "#11111b"
|
|
||||||
|
@ -61,6 +61,8 @@ function rmknownhosts() {
|
|||||||
function rubbish() {
|
function rubbish() {
|
||||||
if check_cmd trash-empty; then
|
if check_cmd trash-empty; then
|
||||||
trash-empty
|
trash-empty
|
||||||
|
else
|
||||||
|
rm -rf "${HOME}/.local/share/Trash/files/*"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -233,3 +235,9 @@ function restart() { exec $SHELL $SHELL_ARGS "$@"; }
|
|||||||
|
|
||||||
# cd to ~, clear screen, and restart zsh.
|
# cd to ~, clear screen, and restart zsh.
|
||||||
function rsrc() { cd && clear && restart; }
|
function rsrc() { cd && clear && restart; }
|
||||||
|
|
||||||
|
# Copy SSH public key to clipboard
|
||||||
|
function pubkey() {
|
||||||
|
cat "${HOME}/.ssh/id_ed25519.pubkk" | tr -d '\n' | wl-copy
|
||||||
|
echo "🔑 SSH public key copied to clipboard"
|
||||||
|
}
|
||||||
|
68
home.nix
68
home.nix
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
@ -15,7 +20,6 @@
|
|||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
arp-scan
|
|
||||||
curlie
|
curlie
|
||||||
direnv
|
direnv
|
||||||
diskonaut
|
diskonaut
|
||||||
@ -35,6 +39,7 @@
|
|||||||
ripgrep
|
ripgrep
|
||||||
starship
|
starship
|
||||||
tealdeer
|
tealdeer
|
||||||
|
trash-cli
|
||||||
vivid
|
vivid
|
||||||
wthrr
|
wthrr
|
||||||
yazi
|
yazi
|
||||||
@ -44,10 +49,6 @@
|
|||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
# plain files is through 'home.file'.
|
# plain files is through 'home.file'.
|
||||||
home.file = {
|
home.file = {
|
||||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
|
||||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
|
||||||
# # symlink to the Nix store copy.
|
|
||||||
# ".screenrc".source = dotfiles/screenrc;
|
|
||||||
".justfile".source = confs/justfile;
|
".justfile".source = confs/justfile;
|
||||||
".zshrc.d".source = confs/zshrc.d;
|
".zshrc.d".source = confs/zshrc.d;
|
||||||
".doom.d/config.el".source = doom.d/config.el;
|
".doom.d/config.el".source = doom.d/config.el;
|
||||||
@ -65,16 +66,36 @@
|
|||||||
themes = {
|
themes = {
|
||||||
Catppuccin-mocha = {
|
Catppuccin-mocha = {
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "catppuccin";
|
owner = "catppuccin";
|
||||||
repo = "bat";
|
repo = "bat";
|
||||||
rev = "d3feec47b16a8e99eabb34cdfbaa115541d374fc";
|
rev = "d3feec47b16a8e99eabb34cdfbaa115541d374fc";
|
||||||
sha256 = "sha256-s0CHTihXlBMCKmbBBb8dUhfgOOQu9PBCQ+uviy7o47w=";
|
sha256 = "sha256-s0CHTihXlBMCKmbBBb8dUhfgOOQu9PBCQ+uviy7o47w=";
|
||||||
};
|
};
|
||||||
file = "/themes/Catppuccin Mocha.tmTheme";
|
file = "/themes/Catppuccin Mocha.tmTheme";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# fzf config
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
colors = {
|
||||||
|
"bg+" = "#302D41";
|
||||||
|
bg = "#1E1E2E";
|
||||||
|
spinner = "#F8BD96";
|
||||||
|
hl = "#F28FAD";
|
||||||
|
fg = "#D9E0EE";
|
||||||
|
header = "#F28FAD";
|
||||||
|
info = "#DDB6F2";
|
||||||
|
pointer = "#F8BD96";
|
||||||
|
marker = "#F8BD96";
|
||||||
|
"fg+" = "#F2CDCD";
|
||||||
|
prompt = "#DDB6F2";
|
||||||
|
"hl+" = "#F28FAD";
|
||||||
|
};
|
||||||
|
defaultCommand = "fd --type f --hidden --follow --exclude .git";
|
||||||
|
};
|
||||||
|
|
||||||
# starship.rs
|
# starship.rs
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -89,6 +110,7 @@
|
|||||||
autocd = false;
|
autocd = false;
|
||||||
envExtra = ''
|
envExtra = ''
|
||||||
export PATH="$HOME/bin:$HOME/.local/bin:/usr/sbin:$PATH"
|
export PATH="$HOME/bin:$HOME/.local/bin:/usr/sbin:$PATH"
|
||||||
|
eval "$(starship init zsh)"
|
||||||
'';
|
'';
|
||||||
history = {
|
history = {
|
||||||
extended = true;
|
extended = true;
|
||||||
@ -120,25 +142,22 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "${config.home.homeDirectory}/.zshrc.d";
|
name = "${config.home.homeDirectory}/.zshrc.d";
|
||||||
tags = [ "from:local" "use:'*'" ];
|
tags = [
|
||||||
|
"from:local"
|
||||||
|
"use:'*'"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
acs = "sudo apt-cache search $@";
|
dnfi = "sudo dnf install $@";
|
||||||
acp = "sudo apt-cache policy $@";
|
dnfs = "sudo dnf search $@";
|
||||||
afs = "sudo apt-file search $@";
|
dnfu = "sudo dnf update $@";
|
||||||
afu = "sudo apt-file update";
|
dnfr = "sudo dnf remove $@";
|
||||||
agi = "sudo apt install $@";
|
|
||||||
agp = "sudo apt purge $@";
|
|
||||||
agr = "sudo apt remove $@";
|
|
||||||
agu = "sudo apt update";
|
|
||||||
agud = "sudo apt update && sudo apt dist-upgrade";
|
|
||||||
agar = "sudo apt autoremove";
|
|
||||||
ls = "eza --git --icons $@";
|
ls = "eza --git --icons $@";
|
||||||
la = "eza --git --icons -a $@";
|
la = "eza --git --icons -a $@";
|
||||||
lal = "eza --git --icons -al $@";
|
lal = "eza --git --icons -al $@";
|
||||||
ll = "eza --git --icons -l $@";
|
ll = "eza --git --icons -l $@";
|
||||||
grep = "rg $@";
|
grep = "grep --color=auto";
|
||||||
df = "duf $@";
|
df = "duf $@";
|
||||||
cp = "cp -i $@";
|
cp = "cp -i $@";
|
||||||
rm = "trash $@";
|
rm = "trash $@";
|
||||||
@ -170,7 +189,6 @@
|
|||||||
dclean = "\${xdg.configHome}/emacs/bin/doom clean";
|
dclean = "\${xdg.configHome}/emacs/bin/doom clean";
|
||||||
dgc = "\${xdg.configHome}/emacs/bin/doom gc";
|
dgc = "\${xdg.configHome}/emacs/bin/doom gc";
|
||||||
dupgrade = "\${xdg.configHome}/emacs/bin/doom upgrade";
|
dupgrade = "\${xdg.configHome}/emacs/bin/doom upgrade";
|
||||||
pubkey = "cat ${config.home.homeDirectory}/.ssh/id_ed25519.pub | tr -d '\n' | wl-copy";
|
|
||||||
};
|
};
|
||||||
shellGlobalAliases = {
|
shellGlobalAliases = {
|
||||||
G = "| grep";
|
G = "| grep";
|
||||||
@ -204,10 +222,6 @@
|
|||||||
if test -x ${config.home.homeDirectory}/bin/gumssh; then bindkey -s '^[s' 'gumssh^M'; fi
|
if test -x ${config.home.homeDirectory}/bin/gumssh; then bindkey -s '^[s' 'gumssh^M'; fi
|
||||||
bindkey -s '^[f' 'yazi^M'
|
bindkey -s '^[f' 'yazi^M'
|
||||||
'';
|
'';
|
||||||
initExtra = ''
|
|
||||||
eval "$(direnv hook zsh)"
|
|
||||||
eval "$(starship init zsh)"
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# neovim
|
# neovim
|
||||||
|
Loading…
Reference in New Issue
Block a user