- add home/theme.nix as the single Silicon Volt palette and pass it to home modules via extraSpecialArgs - drive foot, hyprland, hyprlock, mako, fzf, starship, rofi and the herdr picker from that palette; raw config files use @color@ tokens substituted at build time - pass my = config.my into home-manager; add my.pi.enable, my.flakeDir - gate home/pi.nix on my.pi.enable (enabled on hades) - route zshconf/hyprconf aliases and FLAKE_CONFIG through my.flakeDir - rename the hyprland monitor option volt.monitors -> hypr.monitors - fix use_auto_tmux command-substitution bug in zsh/init.zsh - track home/nvim/config/lazy-lock.json for reproducible plugins - document theming and toggles in the README
152 lines
3.6 KiB
Nix
152 lines
3.6 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
theme,
|
|
my,
|
|
...
|
|
}:
|
|
|
|
{
|
|
programs.bat = {
|
|
enable = true;
|
|
config = {
|
|
theme = "base16";
|
|
};
|
|
};
|
|
|
|
programs.lsd = {
|
|
enable = true;
|
|
enableZshIntegration = false; # We explicitly define custom aliases below
|
|
};
|
|
|
|
programs.fzf = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
defaultOptions = [
|
|
"--color=dark"
|
|
"--color=fg:${theme.colors.textSecondary},bg:-1,hl:${theme.colors.accentVolt},fg+:${theme.colors.textPrimary},bg+:${theme.colors.glassBg},hl+:${theme.colors.accentVoltLight}"
|
|
"--color=info:${theme.colors.textMuted},prompt:${theme.colors.accentVolt},pointer:${theme.colors.accentCoral},marker:${theme.colors.accentVolt},spinner:${theme.colors.accentBlue},header:${theme.colors.accentBlue}"
|
|
"--color=border:${theme.colors.surfaceVariant},bg+:-1,gutter:-1"
|
|
];
|
|
};
|
|
|
|
programs.zoxide = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
options = [
|
|
"--cmd"
|
|
"cd"
|
|
];
|
|
};
|
|
|
|
programs.starship = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
settings = builtins.fromTOML (
|
|
lib.replaceStrings
|
|
[ "@text@" "@volt@" "@blue@" "@coral@" "@voltLight@" ]
|
|
[
|
|
theme.colors.textSecondary
|
|
theme.colors.accentVolt
|
|
theme.colors.accentBlue
|
|
theme.colors.accentCoral
|
|
theme.colors.accentVoltLight
|
|
]
|
|
(builtins.readFile ./starship/starship.toml)
|
|
);
|
|
};
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
autosuggestion.enable = true;
|
|
syntaxHighlighting = {
|
|
enable = true;
|
|
highlighters = [
|
|
"main"
|
|
"brackets"
|
|
];
|
|
};
|
|
|
|
oh-my-zsh = {
|
|
enable = true;
|
|
plugins = [
|
|
"git"
|
|
"tmux"
|
|
"battery"
|
|
"colored-man-pages"
|
|
"jsontools"
|
|
];
|
|
extraConfig = ''
|
|
COMPLETION_WAITING_DOTS="..."
|
|
ZVM_INIT_MODE="sourcing"
|
|
'';
|
|
};
|
|
|
|
plugins = [
|
|
{
|
|
name = "fzf-tab";
|
|
src = pkgs.zsh-fzf-tab;
|
|
file = "share/fzf-tab/fzf-tab.plugin.zsh";
|
|
}
|
|
{
|
|
name = "zsh-interactive-cd";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "changyuheng";
|
|
repo = "zsh-interactive-cd";
|
|
rev = "e7d4802aa526ec069dafec6709549f4344ce9d4a";
|
|
sha256 = "sha256-j23Ew18o7i/7dLlrTu0/54+6mbY8srsptfrDP/9BI/Q=";
|
|
};
|
|
file = "zsh-interactive-cd.plugin.zsh";
|
|
}
|
|
];
|
|
|
|
sessionVariables = {
|
|
EDITOR = "nvim";
|
|
BAT_THEME = "base16";
|
|
ZSH_TMUX_FIXTERM = "true";
|
|
GPG_TTY = "$(tty)";
|
|
PNPM_HOME = "$HOME/.local/share/pnpm";
|
|
FLAKE_CONFIG = my.flakeDir;
|
|
};
|
|
|
|
shellAliases = {
|
|
vim = "nvim";
|
|
cat = "bat --paging=never";
|
|
ls = "lsd";
|
|
l = "ls -al";
|
|
clear = "clear -x";
|
|
rm = "rm -I";
|
|
zshconf = "$EDITOR ${my.flakeDir}/home/zsh.nix";
|
|
hyprconf = "$EDITOR ${my.flakeDir}/home/hypr/hyprland.nix";
|
|
setup = "source ./setup_env.sh";
|
|
gpuenv = "__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia";
|
|
digital = "$HOME/Tools/Digital/Digital.sh";
|
|
nixos_test = "rebuild test";
|
|
nixos_switch = "rebuild switch";
|
|
"rebuild-switch" = "rebuild switch";
|
|
"rebuild-test" = "rebuild test";
|
|
"rebuild-boot" = "rebuild boot";
|
|
"rebuild-build" = "rebuild build";
|
|
|
|
# Herdr multiplexer aliases
|
|
hs = "herdr-picker";
|
|
ha = "herdr session attach";
|
|
hl = "herdr session list";
|
|
hn = "herdr session new";
|
|
hk = "herdr session stop";
|
|
};
|
|
|
|
initContent = builtins.readFile ./zsh/init.zsh;
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
pfetch-rs
|
|
bitwarden-cli
|
|
pandoc
|
|
zathura
|
|
tmux
|
|
];
|
|
}
|