switched to dentritic pattern and cleaned up config

This commit is contained in:
2026-08-30 13:24:46 +02:00
parent 325f4a0e0c
commit 47325d4031
133 changed files with 565 additions and 1865 deletions
+7
View File
@@ -0,0 +1,7 @@
{ ... }:
{
flake.modules.homeManager.direnv = { ... }: {
programs.direnv.enable = true;
programs.direnv.silent = true;
};
}
+24
View File
@@ -0,0 +1,24 @@
{ ... }:
{
flake.modules.homeManager.fish = { pkgs, ... }: {
home.packages = [
pkgs.lsd
];
programs.fish = {
enable = true;
shellInit = ''
fish_vi_key_bindings
set -g fish_color_command brblue
set fish_greeting
'';
shellAliases = {
v = "nvim";
ls = "lsd";
nix-shell = "nix-shell --command 'fish'";
nix-dev = "nix develop --command fish";
gnome-control-center = "nix-shell -p gnome-control-center --run 'XDG_CURRENT_DESKTOP=GNOME gnome-control-center'";
};
};
};
}
+113
View File
@@ -0,0 +1,113 @@
{ ... }:
{
flake.modules.homeManager.ghostty = { pkgs, ... }: {
home.packages = [
pkgs.ghostty
pkgs.nerd-fonts.profont
pkgs.nerd-fonts.heavy-data
pkgs.meslo-lgs-nf
pkgs.nerd-fonts.jetbrains-mono
];
programs.ghostty.enable = true;
programs.ghostty.settings = {
theme = "Nord";
window-decoration = false;
gtk-tabs-location = "hidden";
background-opacity = 0.8;
# background-opacity = 1;
window-padding-x = 20;
window-padding-y = 20;
cursor-style = "bar";
# ProFont
# font-family = "ProFont IIx Nerd Font";
# font-family-bold = MesloLGS NF Bold;
# font-family-italic = MesloLGS NF Italic;
# font-family-bold-italic = MesloLGS NF Bold Italic;
# JetBrainsMono
font-family = "JetBrainsMono NF";
# font-family-bold = MesloLGS NF Bold;
# font-family-italic = MesloLGS NF Italic;
# font-family-bold-italic = MesloLGS NF Bold Italic;
font-style = false;
command = "tmux";
shell-integration = "fish";
shell-integration-features = "no-cursor";
font-feature = [
"ss01"
"ss02"
"ss03"
"ss04"
# "-liga, -calt, -dlig"
];
keybind = [
"clear"
"ctrl+comma=open_config"
"shift+insert=paste_from_selection"
"ctrl+page_down=next_tab"
"ctrl+shift+v=paste_from_clipboard"
"ctrl+alt+up=goto_split:up"
"ctrl+shift+a=select_all"
"super+ctrl+shift+plus=equalize_splits"
"shift+up=adjust_selection:up"
"alt+five=goto_tab:5"
"super+ctrl+right_bracket=goto_split:next"
"ctrl+equal=increase_font_size:1"
"ctrl+shift+o=new_split:right"
"ctrl+shift+c=copy_to_clipboard"
"ctrl+shift+q=quit"
"ctrl+shift+n=new_window"
"ctrl+shift+page_down=jump_to_prompt:1"
"ctrl+shift+comma=reload_config"
"ctrl+minus=decrease_font_size:1"
"shift+left=adjust_selection:left"
"super+ctrl+shift+up=resize_split:up,10"
"alt+eight=goto_tab:8"
"shift+page_up=scroll_page_up"
"ctrl+alt+shift+j=write_screen_file:open"
"ctrl+shift+left=previous_tab"
"ctrl+shift+w=close_tab"
"shift+end=scroll_to_bottom"
"ctrl+zero=reset_font_size"
"alt+three=goto_tab:3"
"ctrl+shift+j=write_screen_file:paste"
"ctrl+page_up=previous_tab"
"shift+right=adjust_selection:right"
"ctrl+tab=next_tab"
"ctrl+alt+left=goto_split:left"
"shift+page_down=scroll_page_down"
"ctrl+shift+right=next_tab"
"ctrl+shift+page_up=jump_to_prompt:-1"
"alt+nine=last_tab"
"ctrl+shift+t=new_tab"
"shift+down=adjust_selection:down"
"super+ctrl+shift+left=resize_split:left,10"
"ctrl+shift+tab=previous_tab"
"alt+two=goto_tab:2"
"ctrl+alt+down=goto_split:down"
"super+ctrl+shift+down=resize_split:down,10"
"super+ctrl+shift+right=resize_split:right,10"
"ctrl+plus=increase_font_size:1"
"alt+four=goto_tab:4"
"ctrl+insert=copy_to_clipboard"
"ctrl+shift+e=new_split:down"
"ctrl+alt+right=goto_split:right"
"alt+f4=close_window"
"alt+one=goto_tab:1"
"ctrl+shift+enter=toggle_split_zoom"
"shift+home=scroll_to_top"
"super+ctrl+left_bracket=goto_split:previous"
"ctrl+shift+i=inspector:toggle"
"alt+six=goto_tab:6"
"alt+seven=goto_tab:7"
];
};
};
}
+27
View File
@@ -0,0 +1,27 @@
{ ... }:
{
flake.modules.homeManager.kitty = { ... }: {
programs.kitty.enable = true;
programs.kitty.settings = {
shell = "fish";
font_family = "MesloLGS NF";
bold_font = "auto";
italic_font = "auto";
bold_italic_font = "auto";
font_size = 12;
background_opacity = 0.4;
draw_minimal_borders = "yes";
window_padding_width = 14;
window_border_width = 0;
hide_window_decorations = "yes";
titlebar-only = "yes";
active_border_color = "none";
active_tab_title_template = "{fmt.fg._fff}{title}";
active_tab_foreground = "#fff";
active_tab_font_style = "bold-italic";
active_tab_background = "#8631B4";
inactive_tab_foreground = "#c2c2c2";
inactive_tab_background = "#8631B4";
};
};
}
+19
View File
@@ -0,0 +1,19 @@
{ ... }:
{
flake.modules.homeManager.nushell = { ... }: {
programs.nushell = {
enable = true;
extraConfig = ''
$env.config = {
show_banner: false
edit_mode: vi
}
'';
shellAliases = {
v = "steam-run nvim";
nix-dev = "nix develop --command fish";
nix-shell = "nix-shell --command 'fish'";
};
};
};
}
+14
View File
@@ -0,0 +1,14 @@
{ self, ... }:
{
flake.modules.homeManager.shell = { ... }: {
imports = [
self.modules.homeManager.starship
self.modules.homeManager.fish
self.modules.homeManager.nushell
self.modules.homeManager.tmux
self.modules.homeManager.ghostty
self.modules.homeManager.direnv
];
};
}
+127
View File
@@ -0,0 +1,127 @@
{ ... }:
let
theme = {
primary = "#81a1c1";
secondary = "#4C566A";
accent = "#88C0D0";
primary-foreground = "#ffffff";
git = "#FCA17D";
language = "#86BBD8";
docker = "#1D63ED";
};
starshipLib.toLanguageConfig = symbol: {
symbol = symbol;
style = "bg:language";
format = "[ $symbol ($version) ]($style)";
};
in
{
flake.modules.homeManager.starship = { lib, ... }: {
programs.starship.enable = true;
programs.starship.settings = {
palette = "default";
format = lib.concatStrings [
"[](bg: secondary)"
"$os"
"[](fg:secondary bg:primary)"
"$directory"
"[](fg:primary bg:#FCA17D)"
"$git_branch"
"$git_status"
"[](fg:#FCA17D bg:language)"
"$c"
"$elixir"
"$elm"
"$golang"
"$gradle"
"$haskell"
"$java"
"$julia"
"$nodejs"
"$nim"
"$rust"
"$scala"
"$nix_shell"
"[ ](fg:language)"
];
right_format = "$cmd_duration";
os = {
style = "bg:secondary";
disabled = false; # Disabled by default
symbols = {
NixOS = " ";
};
};
directory = {
style = "bg:primary fg:primary-foreground";
format = "[ $path ]($style)";
truncation_length = 1;
truncation_symbol = "";
};
directory.substitutions = {
"Documents" = "󰈙 Documents";
"Downloads" = " Downloads";
"Music" = " Music";
"Pictures" = " Pictures";
};
nim = starshipLib.toLanguageConfig "󰆥 ";
rust = starshipLib.toLanguageConfig "";
java = starshipLib.toLanguageConfig " ";
golang = starshipLib.toLanguageConfig " ";
c = starshipLib.toLanguageConfig " ";
elixir = starshipLib.toLanguageConfig " ";
elm = starshipLib.toLanguageConfig " ";
gradle = starshipLib.toLanguageConfig " ";
haskell = starshipLib.toLanguageConfig " ";
julia = starshipLib.toLanguageConfig " ";
nodejs = starshipLib.toLanguageConfig "";
scala = starshipLib.toLanguageConfig " ";
nix_shell = {
symbol = " ";
style = "bg:language";
format = "[ $symbol$state( \($name\))]($style)";
unknown_msg = "nix-shell";
};
git_branch = {
symbol = "";
style = "bg:#FCA17D";
format = "[ $symbol $branch ]($style)";
};
git_status = {
style = "bg:#FCA17D";
format = "[ $all_status$ahead_behind ]($style)";
};
cmd_duration = {
min_time = 1000;
style = "bg:secondary";
format = ''
[](bg: secondary)
[ $duration ]($style)
[](fg:secondary)
'';
};
palettes.default = {
primary = theme.primary;
secondary = theme.secondary;
accent = theme.accent;
primary-foreground = theme.primary-foreground;
git = theme.git;
language = theme.language;
docker = theme.docker;
};
};
};
}
+68
View File
@@ -0,0 +1,68 @@
{ ... }:
{
flake.modules.homeManager.tmux =
{
pkgs,
...
}:
{
programs.tmux.enable = true;
programs.tmux.extraConfig = ''
set -sg escape-time 0
set -g base-index 1
set -g default-terminal "screen-256color"
unbind C-o
unbind C-j
bind-key "C-j" run-shell "sesh connect \"$(
sesh list --icons | fzf-tmux -p 80%,70% \
--no-sort --ansi --border-label ' sesh ' --prompt ' ' \
--header ' ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
--bind 'tab:down,btab:up' \
--bind 'ctrl-a:change-prompt( )+reload(sesh list --icons)' \
--bind 'ctrl-t:change-prompt(🪟 )+reload(sesh list -t --icons)' \
--bind 'ctrl-g:change-prompt( )+reload(sesh list -c --icons)' \
--bind 'ctrl-x:change-prompt(📁 )+reload(sesh list -z --icons)' \
--bind 'ctrl-f:change-prompt(🔎 )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
--bind 'ctrl-d:execute(tmux kill-session -t {2..})+change-prompt( )+reload(sesh list --icons)' \
--preview-window 'right:55%' \
--preview 'sesh preview {}'
)\""
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded..."
set-option -g mode-keys vi
set -g mouse on
set -g status on
set -g focus-events on
set -g status-style bg=default
set -g status-right '#(cat #{socket_path}-\#{session_id}-vimbridge-R)'
set -g status-left '#(cat #{socket_path}-\#{session_id}-vimbridge)'
set -g status-left-length 99
set -g status-right-length 99
set -g status-justify absolute-centre
'';
programs.tmux.plugins = [
{
plugin = pkgs.tmuxPlugins.resurrect;
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
}
{
plugin = pkgs.tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-restore 'on'
set -g @continuum-save-interval '1' # minutes
'';
}
];
home.packages = [
# tmux sessionizer + dependencies
pkgs.sesh
pkgs.zoxide
pkgs.fzf
];
};
}