feat(system): add gaming preset module

Opt-in `nomarchy.system.gaming.enable` (default false). Wires
`programs.steam` (with `remotePlay` and `localNetworkGameTransfers`
firewall holes opened via `mkDefault`), `programs.gamemode` (the
launching user must be in the `gamemode` group), and
`services.flatpak`.

Two pieces of the original roadmap entry split into separate
Next-column rows so the system-side preset ships now:

  1. Hyprland fullscreen-on-Steam-launch window rule (home-side).
  2. Declarative flathub remote (nixpkgs has no API for this; needs
     either an overlay or a one-shot systemd unit).

The flatpak service is enabled but the user must add flathub
manually after first boot — documented in OPTIONS.md.
This commit is contained in:
Bernardo Magri
2026-04-26 09:10:52 +01:00
parent 8266dc7ee2
commit 21ee9c6035
5 changed files with 40 additions and 1 deletions

20
core/system/gaming.nix Normal file
View File

@@ -0,0 +1,20 @@
{ config, lib, ... }:
let
cfg = config.nomarchy.system.gaming;
in
{
config = lib.mkIf cfg.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = lib.mkDefault true;
localNetworkGameTransfers.openFirewall = lib.mkDefault true;
};
# gamemode adjusts CPU governor and reschedules processes when a
# game requests it. The launching user must be in the `gamemode` group.
programs.gamemode.enable = true;
services.flatpak.enable = true;
};
}