M hosts/alice/default.nix => hosts/alice/default.nix +5 -1
@@ 36,5 36,9 @@
roles.nvidia.enable = true;
roles.plasma.enable = true;
- roles.steam.enable = true;
+ roles.gaming = {
+ enable = true;
+ lutris.enable = true;
+ steam.enable = true;
+ };
}
M roles/default.nix => roles/default.nix +2 -1
@@ 1,6 1,8 @@
{...}: {
imports = [
+ ./gaming
./shell
+
./audio.nix
./bluetooth.nix
./base.nix
@@ 11,7 13,6 @@
./nvidia.nix
./plasma.nix
./qutebrowser.nix
- ./steam.nix
./zellij.nix
];
}
A roles/gaming/default.nix => roles/gaming/default.nix +58 -0
@@ 0,0 1,58 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: let
+ cfg = config.roles.gaming;
+in {
+ imports = [
+ ./lutris.nix
+ ./steam.nix
+ ];
+
+ options.roles.gaming = {
+ enable = lib.mkEnableOption "gaming utilities";
+ lutris.enable = lib.mkEnableOption "Lutris";
+ steam.enable = lib.mkEnableOption "Steam";
+ };
+
+ config = lib.mkIf cfg.enable {
+ programs.gamemode = {
+ enable = true;
+ };
+
+ environment.systemPackages = with pkgs; [
+ gamescope
+ protontricks
+ gnome.zenity
+ ];
+
+ hm = {
+ programs.mangohud = {
+ enable = true;
+ enableSessionWide = false;
+ settings = {
+ fps_limit = "60,90,120,200";
+ time = true;
+
+ gpu_stats = true;
+ gpu_temp = true;
+ gpu_text = "GPU";
+
+ cpu_stats = true;
+ cpu_temp = true;
+ cpu_text = "CPU";
+
+ vram = true;
+ ram = true;
+
+ fps = true;
+ frametime = true;
+ frame_timing = true;
+ show_fps_limit = true;
+ };
+ };
+ };
+ };
+}
A roles/gaming/lutris.nix => roles/gaming/lutris.nix +16 -0
@@ 0,0 1,16 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: let
+ cfg = config.roles.gaming;
+in {
+ config = lib.mkIf cfg.lutris.enable {
+ environment.systemPackages = with pkgs; [
+ lutris
+
+ wineWowPackages.stable
+ ];
+ };
+}
A roles/gaming/steam.nix => roles/gaming/steam.nix +22 -0
@@ 0,0 1,22 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ cfg = config.roles.gaming;
+in {
+ config = lib.mkIf cfg.steam.enable {
+ arta.unfree.allow = [
+ "steam-run"
+ "steam-original"
+ "steam"
+ ];
+
+ programs.steam = {
+ enable = true;
+ remotePlay.openFirewall = false;
+ dedicatedServer.openFirewall = false;
+ };
+ hardware.steam-hardware.enable = true;
+ };
+}