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>
88 lines
2.0 KiB
Nix
88 lines
2.0 KiB
Nix
{ config, pkgs, inputs, lib, ... }:
|
|
|
|
let
|
|
nomarchyLib = import ../lib { inherit lib; };
|
|
userPackagesFile = "${config.home.homeDirectory}/.config/home-manager/user-packages.json";
|
|
userPackages = if builtins.pathExists userPackagesFile then
|
|
let
|
|
pkgNames = builtins.fromJSON (builtins.readFile userPackagesFile);
|
|
# Filter to only packages that exist in pkgs to prevent build failures
|
|
validPkgs = builtins.filter (name: builtins.hasAttr name pkgs) pkgNames;
|
|
in builtins.map (name: pkgs.${name}) validPkgs
|
|
else [];
|
|
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
|
|
./behavior-configs.nix
|
|
./theme-loader.nix
|
|
./theme-files.nix
|
|
./fonts.nix
|
|
./alacritty.nix
|
|
./nightlight.nix
|
|
./idle.nix
|
|
./stylix.nix
|
|
./hyprland.nix
|
|
./waybar.nix
|
|
./walker.nix
|
|
./theme-switcher.nix
|
|
./scripts.nix
|
|
./configs.nix
|
|
./swayosd.nix
|
|
./security.nix
|
|
./battery-monitor.nix
|
|
./bash.nix
|
|
];
|
|
|
|
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
|
|
|
|
# Media
|
|
imv # Image viewer
|
|
mpv # Video player
|
|
|
|
# Hyprland ecosystem
|
|
swww # Wallpaper daemon
|
|
mako # Notification daemon
|
|
hyprlock # Lock screen
|
|
|
|
# Screenshot and clipboard
|
|
wl-clipboard
|
|
grim
|
|
slurp
|
|
|
|
# Hardware control
|
|
brightnessctl
|
|
playerctl
|
|
pamixer
|
|
|
|
# Utilities
|
|
jq
|
|
xmlstarlet
|
|
mise
|
|
gum # TUI components for scripts
|
|
|
|
# Theming
|
|
yaru-theme
|
|
bibata-cursors
|
|
|
|
# Fonts
|
|
nerd-fonts.jetbrains-mono
|
|
nerd-fonts.roboto-mono
|
|
nerd-fonts.fira-code
|
|
nerd-fonts.ubuntu-mono
|
|
] ++ userPackages);
|
|
}
|