restructure

This commit is contained in:
2026-04-22 09:22:24 -05:00
parent 63559c16ac
commit e2a6515ad6
132 changed files with 364 additions and 473 deletions

View File

@@ -0,0 +1,35 @@
{ ... }: {
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
home.packages = with pkgs; [ oh-my-posh ];
programs.bash = {
enable = true;
enableCompletion = true;
shellAliases = {
ls = "eza";
ll = "ls -l";
ksh = "kitten ssh";
v = "nvim";
vi = "nvim";
vim = "nvim";
};
bashrcExtra = ''
source ${pkgs.blesh}/share/blesh/ble.sh
'';
initExtra = if config.homeconfig.wal.enable then (lib.mkBefore ''
cat ${config.home.homeDirectory}/.cache/wal/sequences
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
'') else (lib.mkBefore ''
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
'');
};
};
}

View File

@@ -0,0 +1,21 @@
{ ... }: {
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
programs.bat = {
enable = true;
extraPackages = with pkgs.bat-extras; [
batman
batpipe
batgrep
batdiff
batwatch
prettybat
];
};
};
}

View File

@@ -0,0 +1,20 @@
{ ... }: {
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
programs.eza = {
enable = true;
enableZshIntegration = true;
extraOptions = [
"--color=auto"
];
git = true;
icons = "auto";
};
};
}

View File

@@ -0,0 +1,18 @@
{ ... }: {
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
programs.fzf = {
enable = true;
enableZshIntegration = true;
tmux = {
#enableShellIntegration = true;
#shellIntegrationOptions = [];
};
};
};
}

View File

@@ -0,0 +1,38 @@
{ ... }: {
flake.homeModules.nathan = { config, ... }: {
programs.kitty = {
enable = true;
font = {
name = "FiraCode Nerd Font";
size = 12;
};
extraConfig = ''
confirm_os_window_close 0
include ${config.home.homeDirectory}/.cache/wal/colors-kitty.conf
disable_ligatures never
dynamic_background_opacity yes
tab_bar_edge top
map ctrl+shift+t new_tab
map ctrl+shift+w close_tab
map ctrl+tab next_tab
map ctrl+shift+tab previous_tab
allow_remote_control yes
'';
};
};
}

View File

@@ -0,0 +1,146 @@
{ ... }: {
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
home.packages = with pkgs; [
oh-my-posh
];
programs.zsh = {
initContent = with lib; mkMerge [
(mkIf config.homeconfig.wal.enable (mkBefore ''
cat ${config.home.homeDirectory}/.cache/wal/sequences
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
function _colorRefresh() {
eval $(oh-my-posh init zsh --config ~/.cache/wal/ohmyposh.toml)
zle accept-line
}
zle -N _colorRefresh
bindkey '\r' _colorRefresh
''))
(mkIf (!config.homeconfig.wal.enable) (mkBefore ''
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
''))
];
};
home.file.".config/wal/templates/ohmyposh.toml".text = ''
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version = 2
final_space = true
console_title_template = '{{{{ .Shell }}}} in {{{{ .Folder }}}}'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'os'
style = 'diamond'
trailing_diamond = ''
background = 'p:c1'
foreground = 'p:c12'
template = ' {{{{ .Icon }}}} '
[[blocks.segments]]
type = 'session'
style = 'diamond'
trailing_diamond = ''
background = 'p:c2'
foreground = 'p:c14'
template = '{{{{ .UserName }}}}@{{{{ .HostName }}}}'
[[blocks.segments]]
type = 'path'
style = 'diamond'
trailing_diamond = ''
background = 'p:c4'
foreground = 'p:c13'
template = '{{{{ .Path }}}}'
[blocks.segments.properties]
style = 'full'
[[blocks]]
type = 'prompt'
overflow = 'hidden'
alignment = 'right'
[[blocks.segments]]
type = 'executiontime'
style = 'diamond'
leading_diamond = ''
background = 'p:c4'
foreground = 'p:c13'
template = '{{{{ .FormattedMs }}}}'
[[blocks.segments]]
type = 'time'
style = 'diamond'
leading_diamond = ''
background = 'p:c2'
foreground = 'p:c14'
[[blocks.segments]]
type = 'shell'
style = 'diamond'
leading_diamond = ''
background = 'p:c1'
foreground = 'p:c12'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'text'
style = 'plain'
background = 'transparent'
foreground_templates = [
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
]
template = "{{{{ if gt .Code 0 }}}}! {{{{else}}}} {{{{end}}}}"
[transient_prompt]
foreground_templates = [
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
]
background = 'transparent'
template = "{{{{ if gt .Code 0 }}}}! {{{{else}}}} {{{{end}}}}"
[secondary_prompt]
background = 'transparent'
forground = 'p:c14'
template = " "
[palette]
c0 = "{color0}"
c1 = "{color1}"
c2 = "{color2}"
c3 = "{color3}"
c4 = "{color4}"
c5 = "{color5}"
c6 = "{color6}"
c7 = "{color7}"
c8 = "{color8}"
c9 = "{color9}"
c10 = "{color10}"
c11 = "{color11}"
c12 = "{color12}"
c13 = "{color13}"
c14 = "{color14}"
c15 = "{color15}"
'';
};
}

View File

@@ -0,0 +1,54 @@
{ ... }: {
flake.homeModules.nathan = { config, lib, ... }: {
options.homeconfig.opencode.enable = with lib; mkOption {
type = with types; bool;
default = true;
};
config = lib.mkIf config.homeconfig.opencode.enable {
programs.opencode = {
enable = true;
settings = {
theme = "system";
model = "ollama-remote/qwen3:8b";
provider = {
ollama-local = {
name = "Ollama (local)";
npm = "@ai-sdk/openai-compatible";
options.baseURL = "http://localhost:11434/v1";
models = {
"ministral-3:8b".name = "Ministral 3 8B";
"llama3.2".name = "Llama 3.2";
"qwen3:8b".name = "Qwen 3";
};
};
ollama-remote = {
name = "Ollama (remote)";
npm = "@ai-sdk/openai-compatible";
options.baseURL = "https://ollama.esotericbytes.com/v1";
models = {
"ministral-3:8b".name = "Ministral 3 8B";
"llama3.2".name = "Llama 3.2";
"qwen3:8b".name = "Qwen 3";
};
};
};
};
};
};
};
}

View File

@@ -0,0 +1,9 @@
{ ... }: {
flake.homeModules.nathan = { ... }: {
programs.ripgrep = {
enable = true;
};
};
}

View File

@@ -0,0 +1,27 @@
{ ... }: {
flake.homeModules.nathan = { ... }: {
programs.ssh = {
enable = true;
# defaults as of 25.11
matchBlocks."*" = {
forwardAgent = false;
addKeysToAgent = "no";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
enableDefaultConfig = false;
};
};
}

View File

@@ -0,0 +1,68 @@
{ ... }: {
flake.homeModules.nathan = { config, lib, pkgs, ... }: {
programs.tmux = {
enable = true;
clock24 = true;
mouse = true;
baseIndex = 0;
keyMode = "vi";
prefix = "C-b";
shell = "${pkgs.zsh}/bin/zsh";
extraConfig = ''
set -g status-position top
set -g @background '#0B0704'
set -g @foreground '#c2c1c0'
set -g @color0 '#0B0704'
set -g @color1 '#846550'
set -g @color2 '#4a526c'
set -g @color3 '#538281'
set -g @color4 '#7b8179'
set -g @color5 '#b4a589'
set -g @color6 '#78ada3'
set -g @color7 '#958d89'
set -g @color8 '#665b54'
set -g @color9 '#B1876B'
set -g @color10 '#636E90'
set -g @color11 '#6FAEAC'
set -g @color12 '#A5ADA2'
set -g @color13 '#F1DCB7'
set -g @color14 '#A1E7DA'
set -g @color15 '#c2c1c0'
set -g status-style 'fg=#0B0704,bg=#538281'
set -g @p '#(pwd)'
set -g status-interval 1
set -g status-left-length 50
set -g status-left "#[fg=@color12,bg=@color1] #[fg=@color1,bg=@color2]#[fg=@color14]#{user}@#H#[fg=@color2,bg=@color4]#[fg=@color2]#{s|/home/#{user}|~:@p}#[fg=@color4,bg=@background]"
set -g status-right "#[fg=@color2]#[fg=@color14,bg=@color2]%A %T#[fg=@color1]#[fg=@color12,bg=@color1]%D "
set -g window-status-separator '/'
set -g window-status-format '#[fg=@color3,bg=@color3]#[fg=@background,bg=@color3] #{window_index}: #{window_name} #[fg=@color3,bg=@color3]'
set -g window-status-current-format '#[fg=@color11,bg=@color3]#[fg=@background,bg=@color11,bold] #{window_index}: #{window_name} #[fg=@color11,bg=@color3]'
source ~/.cache/wal/colors-tmux.conf
'';
};
};
}

View File

@@ -0,0 +1,10 @@
{ ... }: {
flake.homeModules.nathan = { ... }: {
config = {
programs.yazi = {
enable = true;
};
};
};
}

View File

@@ -0,0 +1,16 @@
{ ... }: {
flake.homeModules.nathan = { ... }: {
programs.zoxide = {
enable = true;
enableZshIntegration = true;
options = [
"--cmd cd"
];
};
};
}

View File

@@ -0,0 +1,40 @@
{ ... }: {
flake.homeModules.nathan = { lib, ... }: {
programs.zsh = {
enable = true;
initContent = lib.mkOrder 1200 ''
bindkey ' ' magic-space
'';
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
ls = "eza";
ll = "ls -l";
ksh = "kitten ssh";
vi = "nvim";
vim = "nvim";
python = "python3.14";
python3 = "python3.14";
};
history = {
size = 5000;
ignoreAllDups = true;
ignoreSpace = true;
share = true;
};
};
};
}