- my.disks generates disko: NVMe btrfs (@root/@home/@nix/@log/@swap) + SATA SSD btrfs with one subvolume per ~/Games, Downloads, Documents, Music, Pictures, Videos, Storage (nofail) - lanzaboote Secure Boot, systemd initrd, latest kernel - AMD CPU/GPU: amdgpu initrd, OpenCL, LACT, optional ROCm - agenix with host-key identity, optional password and SSH key secrets - Hyprland (UWSM, XWayland) + greetd/tuigreet, Noctalia services, PipeWire, fonts - Steam + Proton-GE, gamescope, gamemode - overlays: compose Hyprland's hyprland-packages + hyprland-extras (upstream default lacks the hyprwm dependency overlays) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J1cugeLkfFLZMpiztQ8TyN
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
# Steam + Proton, gamescope, gamemode and MangoHud.
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.gaming;
|
|
in
|
|
{
|
|
options.my.gaming.enable = lib.mkEnableOption "the gaming stack (Steam, Proton-GE, gamescope, gamemode)";
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
programs = {
|
|
steam = {
|
|
enable = true;
|
|
remotePlay.openFirewall = true;
|
|
localNetworkGameTransfers.openFirewall = true;
|
|
dedicatedServer.openFirewall = false;
|
|
gamescopeSession.enable = true;
|
|
extraCompatPackages = [ pkgs.proton-ge-bin ];
|
|
protontricks.enable = true;
|
|
# Steam Input on Wayland (controllers acting as keyboard/mouse).
|
|
extest.enable = true;
|
|
};
|
|
|
|
gamescope = {
|
|
enable = true;
|
|
# Lets gamescope raise its own priority.
|
|
capSysNice = true;
|
|
};
|
|
|
|
gamemode = {
|
|
enable = true;
|
|
settings = {
|
|
general.renice = 10;
|
|
gpu = {
|
|
apply_gpu_optimisations = "accept-responsibility";
|
|
gpu_device = 0;
|
|
amd_performance_level = "high";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
hardware.steam-hardware.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
mangohud
|
|
protonplus
|
|
];
|
|
|
|
# Some Proton games exhaust the default map count and crash.
|
|
boot.kernel.sysctl."vm.max_map_count" = 2147483642;
|
|
};
|
|
}
|