Files
NixOsConfig/modules/home/hyprland/default.nix
T
Claude 76942e77be home-manager: final Hyprland Lua config, Noctalia, WezTerm, Neovim, shell
Fixes found by build/runtime tests: bind conflict on SUPER+CTRL+L,
lualine theme name for catppuccin-nvim 2.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1cugeLkfFLZMpiztQ8TyN
2026-10-11 12:45:37 +00:00

65 lines
1.9 KiB
Nix

# Hyprland user configuration. Hyprland 0.56 reads Lua, so the real config lives
# in the plain .lua files next to this module; Nix only passes in the few
# values that come from the system config (keyboard layouts, cursor, apps).
{
config,
lib,
pkgs,
osConfig,
...
}:
let
cfg = config.my.home.hyprland;
cursor = config.home.pointerCursor;
# Exposed to the Lua files as `require("nixvars")`.
nixVars = {
kbLayout = lib.concatStringsSep "," osConfig.my.locale.keyboardLayouts;
kbOptions = lib.concatStringsSep "," osConfig.my.locale.keyboardOptions;
terminal = "wezterm";
fileManager = "nautilus";
cursorSize = if cursor.enable then cursor.size else 24;
cursorTheme = if cursor.enable then cursor.name else "";
};
in
{
options.my.home.hyprland.enable = lib.mkEnableOption "Hyprland user configuration (Lua)";
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland = {
enable = true;
configType = "lua";
# The NixOS module (programs.hyprland) installs the compositor and the
# portal, built from the flake overlay. Installing them again here would
# put a second copy in the user profile.
package = null;
portalPackage = null;
# UWSM owns the session and graphical-session.target; HM's own
# hyprland-session.target and dbus import would only duplicate that.
systemd.enable = false;
xwayland.enable = true;
# Loaded in name order; `nixvars` is a helper module, not loaded on its own.
extraLuaFiles = {
nixvars = {
content = "return ${lib.generators.toLua { } nixVars}\n";
autoLoad = false;
};
"10-settings" = ./settings.lua;
"20-binds" = ./binds.lua;
"30-rules" = ./rules.lua;
};
};
# Tools the binds call (screenshots, file manager).
home.packages = with pkgs; [
grim
slurp
wl-clipboard
nautilus
];
};
}