From 27cc1641f278d5c51b39738417413820deaa4c1b Mon Sep 17 00:00:00 2001 From: kenji Date: Wed, 2 Jul 2025 19:28:47 -0500 Subject: [PATCH] added gaming module --- config.nix | 1 + hosts/desktop/configuration.nix | 2 +- modules/gaming.nix | 6 ++++++ system/stream.nix | 8 ++++++++ system/wayland.nix | 4 ++-- 5 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 modules/gaming.nix create mode 100644 system/stream.nix diff --git a/config.nix b/config.nix index 8147ac6..486bd65 100644 --- a/config.nix +++ b/config.nix @@ -84,6 +84,7 @@ # monitor, resolution@refreshrate, position (e.g., 0x0 is middle, 0x1080 is top), scale "DP-1,highres@165,0x1080,auto" "DP-2,highres@highrr,0x0,auto" + "HDMI-A-1, preferred, 20000x20000,1" ]; }; }; diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index e4d8318..77e28d9 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -14,7 +14,7 @@ ../../modules/de.nix ] ++ lib.optionals (myConfig.linux.apps.gaming == true) [ - ../../system/gaming.nix + ../../modules/gaming.nix ]; environment.systemPackages = []; diff --git a/modules/gaming.nix b/modules/gaming.nix new file mode 100644 index 0000000..604f1e4 --- /dev/null +++ b/modules/gaming.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ../system/stream.nix + ../system/gaming.nix + ]; +} diff --git a/system/stream.nix b/system/stream.nix new file mode 100644 index 0000000..a085390 --- /dev/null +++ b/system/stream.nix @@ -0,0 +1,8 @@ +{ + services.sunshine = { + enable = true; + autoStart = true; + capSysAdmin = true; + openFirewall = true; + }; +} diff --git a/system/wayland.nix b/system/wayland.nix index b53457d..d7c4539 100644 --- a/system/wayland.nix +++ b/system/wayland.nix @@ -11,8 +11,8 @@ ]; programs.hyprland = { enable = true; - # package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; - # portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; + package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; }; hardware = { graphics.enable = true;