{ 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 ../themes/engine/stylix-compat.nix ../core/home/options.nix ../core/home/state.nix ../core/home/overrides.nix ../core/home/behavior.nix ../themes/engine/loader.nix ../themes/engine/files.nix ../core/home/fonts.nix ./apps/alacritty/default.nix ./desktop/nightlight.nix ./desktop/idle.nix ../themes/engine/stylix.nix ./desktop/hyprland/default.nix ./desktop/waybar/default.nix ./apps/walker.nix ../themes/engine/switcher.nix ./scripts/default.nix ../core/home/configs.nix ./apps/swayosd.nix ../core/home/security.nix ./scripts/battery-monitor.nix ../core/home/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 xdg-terminal-exec swaybg rofi-wayland # Theming yaru-theme everforest-gtk-variant bibata-cursors ] ++ userPackages); }