fix: add stylix compatibility shims for missing program options

Stylix unconditionally imports all target modules, which expect certain
program options to exist even when those programs aren't enabled. This
causes evaluation errors.

Add stylix-compat.nix with stub options for:
- programs.neovim.initLua (maps to extraLuaConfig)
- programs.opencode.tui/themes

Also:
- Disable neovim/neovide stylix targets (we deploy theme lua via theme-loader)
- Set autoEnable = false to only enable explicitly listed targets
- Enable programs.neovim to satisfy stylix's neovim target
- Update stylix to latest version

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-04-11 20:20:32 +01:00
parent b27fc5aee8
commit a9ee79a5ce
4 changed files with 45 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ in
imports = [
inputs.nix-colors.homeManagerModules.default
inputs.walker.homeManagerModules.default
./stylix-compat.nix # Compatibility shims for stylix target modules
./options.nix
./state.nix
./overrides.nix
@@ -40,11 +41,13 @@ in
colorScheme = lib.mkDefault (nomarchyLib.getColorScheme config.nomarchy.theme);
# Enable neovim program module (required for stylix integration)
programs.neovim.enable = lib.mkDefault true;
home.packages = lib.mkDefault (with pkgs; [
# Core applications
firefox
xfce.thunar
neovim
# Media
imv # Image viewer