- 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
67 lines
1.8 KiB
Nix
67 lines
1.8 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
theme,
|
|
...
|
|
}:
|
|
|
|
let
|
|
# Rofi script-mode indexer: exposes every executable user script
|
|
# (shell, python, whatever) so the launcher finds "everything".
|
|
rofiScripts = pkgs.writeShellScriptBin "rofi-scripts" (builtins.readFile ./rofi/rofi-scripts.sh);
|
|
|
|
# Inject the shared palette into the rasi theme (see home/theme.nix).
|
|
# `/. +` turns the generated derivation into a path, which the rofi module
|
|
# treats as a theme file to link into its data directory.
|
|
rofiThemeText = pkgs.writeText "volt.rasi" (
|
|
lib.replaceStrings
|
|
[
|
|
"@bg0@"
|
|
"@bg1@"
|
|
"@fg0@"
|
|
"@fg1@"
|
|
"@fg2@"
|
|
"@volt@"
|
|
"@voltDim@"
|
|
"@coral@"
|
|
"@border0@"
|
|
]
|
|
[
|
|
"${theme.colors.bgSecondary}f2"
|
|
"${theme.colors.glassBg}f2"
|
|
theme.colors.textSecondary
|
|
theme.colors.textPrimary
|
|
theme.colors.textMuted
|
|
theme.colors.accentVolt
|
|
"${theme.colors.accentVolt}1a"
|
|
theme.colors.accentCoral
|
|
"${theme.colors.textPrimary}14"
|
|
]
|
|
(builtins.readFile ./rofi/volt.rasi)
|
|
);
|
|
in
|
|
{
|
|
# Install the generated theme under the rofi theme search path and select
|
|
# it by name (passing a derivation directly is treated as a rasi attrset).
|
|
xdg.dataFile."rofi/themes/volt.rasi".source = rofiThemeText;
|
|
|
|
programs.rofi = {
|
|
enable = true;
|
|
terminal = "${pkgs.foot}/bin/foot";
|
|
cycle = true;
|
|
theme = "volt";
|
|
|
|
extraConfig = {
|
|
# Combi mode searches .desktop apps (drun), binaries (run),
|
|
# open windows (window) and user scripts (scripts).
|
|
modes = "combi";
|
|
combi-modes = "drun,run,window,scripts:${rofiScripts}/bin/rofi-scripts";
|
|
show-icons = false;
|
|
drun-display-format = "{name} <span alpha='60%'>{comment}</span>";
|
|
display-combi = "silicon volt >";
|
|
matching = "fuzzy";
|
|
sort = true;
|
|
};
|
|
};
|
|
}
|