feat(gaming): add nomarchy.gaming.enable home-side window rule

Mirror of nomarchy.system.gaming.enable. When on, injects a Hyprland
windowrulev2 = fullscreen, class:^(steam_app_).*$ so games launched
through Steam grab the whole screen instead of opening windowed.

Gated via lib.mkIf so the rule is absent when the option is off
(AGENT.md guardrail: features must be option-gated). The rule is
appended to wayland.windowManager.hyprland.extraConfig (types.lines)
so it composes cleanly with the existing source-line entry point in
features/desktop/hyprland/default.nix.

Closes the "Gaming - Hyprland window rule" Next-column roadmap row.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-04-30 19:14:21 +01:00
parent 3aadc36bff
commit d06ef86bb9
5 changed files with 30 additions and 2 deletions

View File

@@ -10,5 +10,6 @@
./configs.nix
./security.nix
./bash.nix
./gaming.nix
];
}

12
core/home/gaming.nix Normal file
View File

@@ -0,0 +1,12 @@
{ config, lib, ... }:
let
cfg = config.nomarchy.gaming;
in
{
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland.extraConfig = ''
windowrulev2 = fullscreen, class:^(steam_app_).*$
'';
};
}

View File

@@ -128,5 +128,16 @@
'';
};
};
gaming = {
enable = lib.mkEnableOption ''
Gaming preset (home-side companion to nomarchy.system.gaming.enable).
Adds a Hyprland window rule that fullscreens windows whose class
matches steam_app_* i.e. games launched through Steam so they
grab the whole screen instead of opening windowed. Set this to the
same value as nomarchy.system.gaming.enable; the installer flips
both when the Gaming profile is selected.
'';
};
};
}