Files
NixOS-Configs/home/foot.nix
Anish Govind 8010cea0bc home: centralize theme and make home-manager feature-aware
- 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
2026-09-19 00:48:19 -07:00

120 lines
3.0 KiB
Nix

{
pkgs,
lib,
inputs,
theme,
...
}:
let
herdrPkg =
if
(
inputs ? herdr
&& inputs.herdr ? packages
&& inputs.herdr.packages ? ${pkgs.stdenv.hostPlatform.system}
)
then
inputs.herdr.packages.${pkgs.stdenv.hostPlatform.system}.default
else
(pkgs.herdr or null);
# Inject the shared palette into the picker script (see home/theme.nix).
herdrPicker = pkgs.writeShellScriptBin "herdr-picker" (
lib.replaceStrings
[
"@bg@"
"@glass@"
"@fg@"
"@fgBright@"
"@muted@"
"@volt@"
"@voltLight@"
"@coral@"
"@blue@"
"@surface@"
]
[
theme.colors.bgPrimary
theme.colors.glassBg
theme.colors.textSecondary
theme.colors.textPrimary
theme.colors.textMuted
theme.colors.accentVolt
theme.colors.accentVoltLight
theme.colors.accentCoral
theme.colors.accentBlue
theme.colors.surfaceVariant
]
(builtins.readFile ./scripts/herdr-picker.sh)
);
in
{
home.packages = (if herdrPkg != null then [ herdrPkg ] else [ ]) ++ [
herdrPicker
];
programs.foot = {
enable = true;
settings = {
main = {
font = "JetBrainsMono Nerd Font:size=15";
font-bold = "JetBrainsMono Nerd Font:size=15:weight=bold";
font-italic = "JetBrainsMono Nerd Font:size=15:slant=italic";
pad = "16x16 center";
shell = "${herdrPicker}/bin/herdr-picker";
selection-target = "clipboard";
};
scrollback = {
lines = 10000;
multiplier = 3.0;
};
cursor = {
style = "beam";
blink = "yes";
beam-thickness = 1.5;
};
mouse = {
hide-when-typing = "yes";
};
# Silicon Volt palette, sourced from home/theme.nix.
colors-dark = {
alpha = 0.92;
background = theme.bare.bgPrimary;
foreground = theme.bare.textSecondary;
# Cursor text and cursor (background) colors
cursor = "${theme.bare.bgSecondary} ${theme.bare.accentVolt}";
regular0 = theme.bare.bgSecondary;
regular1 = theme.bare.accentCoral;
regular2 = theme.bare.accentVolt;
regular3 = theme.bare.accentVoltLight;
regular4 = theme.bare.accentBlue;
regular5 = theme.bare.neutralGray;
regular6 = theme.bare.lightCyan;
regular7 = theme.bare.textSecondary;
# Bright Colors
bright0 = theme.bare.surfaceVariant;
bright1 = theme.bare.brightCoral;
bright2 = theme.bare.brightLime;
bright3 = theme.bare.brightVolt;
bright4 = theme.bare.lightCyan;
bright5 = theme.bare.brightGray;
bright6 = theme.bare.brightCyan;
bright7 = theme.bare.textPrimary;
# Selection & URLs - volt lime selection like the site
selection-foreground = theme.bare.bgSecondary;
selection-background = theme.bare.accentVolt;
urls = theme.bare.accentBlue;
};
};
};
}