{ config, pkgs, lib, ... }: let configDir = ./config; # Explicit list of config items to manage # This replaces dynamic builtins.readDir for clarity and faster evaluation configItems = { # Directories fastfetch = "directory"; fcitx5 = "directory"; fontconfig = "directory"; git = "directory"; imv = "directory"; "nautilus-python" = "directory"; nomarchy = "directory"; "nomarchy-skill" = "directory"; uwsm = "directory"; wiremix = "directory"; # Files "brave-flags.conf" = "regular"; "chromium-flags.conf" = "regular"; "starship.toml" = "regular"; "xdg-terminals.list" = "regular"; }; # Files/directories handled elsewhere or not intended for ~/.config/ # - nomarchy.ttf: font file, not a config # - waybar: handled in waybar.nix # - walker: handled in walker.nix # - alacritty: handled in alacritty.nix # - swayosd: handled in swayosd.nix # Check for user overrides userConfigDir = config.nomarchy.configOverrides; # Generate the xdg.configFile attribute set makeMapping = name: type: let source = if userConfigDir != null then "${userConfigDir}/${name}" else "${configDir}/${name}"; in { inherit name; value = lib.mkDefault { inherit source; recursive = type == "directory"; }; }; configMappings = lib.mapAttrs' (name: type: makeMapping name type) configItems; in { xdg.configFile = configMappings // { # mako reads ~/.config/mako/config by default. The themed Nomarchy # config (urgency rules, app filters, button handlers) lives under # nomarchy/default/mako/core.ini for organizational reasons, so wire # it explicitly here. Without this, mako silently falls back to its # built-in defaults and every Nomarchy notification customization is # inert. "mako/config".source = lib.mkDefault ./config/nomarchy/default/mako/core.ini; # Hyprland's native-Wayland input config — templated from # nomarchy.keymap.{layout,variant} so non-US users get the right # layout in Wayland apps. The previous static input.conf hardcoded # `kb_layout = us`, so the installer's xkb.layout / console.keyMap # writes only reached XWayland and the TTY. Generated here rather # than shipped under config/nomarchy/default/hypr/ so the keymap # values can vary per-host without a source-file edit. "nomarchy/default/hypr/input.conf".text = lib.mkDefault '' # https://wiki.hyprland.org/Configuring/Variables/#input input { kb_layout = ${config.nomarchy.keymap.layout} kb_variant = ${config.nomarchy.keymap.variant} kb_model = kb_options = compose:caps kb_rules = follow_mouse = 1 sensitivity = 0 # -1.0 - 1.0, 0 means no modification. touchpad { natural_scroll = false } } misc { key_press_enables_dpms = true # key press will trigger wake mouse_move_enables_dpms = true # mouse move will trigger wake } ''; }; home.file.".XCompose" = lib.mkDefault { source = ./config/nomarchy/default/xcompose; }; }