diff options
| author | adi <adikro@disroot.org> | 2026-07-29 17:09:58 +0200 |
|---|---|---|
| committer | adi <adikro@disroot.org> | 2026-07-29 17:09:58 +0200 |
| commit | 39a2b09c27bb74c9e59d1772764f901e3c8fb9e4 (patch) | |
| tree | 0ba58e6fbf086a85d875df1c10f6d23bc3bbc7da /os/srv/gaming.nix | |
| parent | 8a820cacee1ff07ae7397d053b26e66f7086a4a4 (diff) | |
revamped flake.nix, removed homelab specific modulesstaging
Diffstat (limited to 'os/srv/gaming.nix')
| -rw-r--r-- | os/srv/gaming.nix | 145 |
1 files changed, 0 insertions, 145 deletions
diff --git a/os/srv/gaming.nix b/os/srv/gaming.nix deleted file mode 100644 index b9b6766..0000000 --- a/os/srv/gaming.nix +++ /dev/null @@ -1,145 +0,0 @@ -{ - config, - lib, - pkgs, - username, - inputs, - ... -}: -let - cfg = config.os.srv.gaming; -in -{ - options.os.srv.gaming = { - enable = lib.mkEnableOption "enables general gaming support"; - - tools.enable = lib.mkEnableOption "enables performance tools" // { - default = cfg.enable; - }; - launchers.enable = lib.mkEnableOption "enables 3rd party launchers" // { - default = cfg.enable; - }; - games.enable = lib.mkEnableOption "enables specific native games"; - steam = { - enable = lib.mkEnableOption "enables the steam launcher"; - enableSls = lib.mkEnableOption "enables the SLS Steam library modification"; - }; - vr.enable = lib.mkEnableOption "enables vr support"; - }; - - config = lib.mkMerge [ - # --- PERFORMANCE & TOOLING --- - (lib.mkIf cfg.tools.enable { - hardware.xone.enable = true; - programs = { - gamescope = { - enable = true; - capSysNice = true; - }; - - gamemode = { - enable = true; - enableRenice = true; - settings = { - general.renice = 10; - }; - }; - }; - environment = { - sessionVariables = { - OPTISCALER_ShortcutKey = "0x24"; # sets the optiscaler shortcut key to be home by default - }; - - systemPackages = with pkgs; [ - mangohud - theclicker - ludusavi - protonplus - ]; - }; - }) - - # --- EXTERNAL LAUNCHERS --- - (lib.mkIf cfg.launchers.enable { - environment.systemPackages = with pkgs; [ - heroic - (prismlauncher.override { - additionalLibs = with pkgs; [ ocl-icd ]; - jdks = with pkgs; [ javaPackages.compiler.temurin-bin.jdk-26 ]; - }) - ]; - }) - - # --- SPECIFIC GAMES --- - (lib.mkIf cfg.games.enable { - environment.systemPackages = with inputs.openmw-nix.packages.${pkgs.stdenv.hostPlatform.system}; [ - (pkgs.openttd-jgrpp) - - # OpenMW Specific - (pkgs.openmw) - (pkgs.tes3cmd) - delta-plugin - groundcoverify - momw-configurator - openmw-validator - s3lightfixes - umo - ]; - }) - - # --- STEAM --- - (lib.mkIf cfg.steam.enable ( - lib.mkMerge [ - { - programs.steam = { - enable = true; - localNetworkGameTransfers.openFirewall = true; - dedicatedServer.openFirewall = true; - remotePlay.openFirewall = false; - extest.enable = true; - protontricks.enable = true; - }; - environment.systemPackages = with pkgs; [ steamtinkerlaunch ]; - } - - (lib.mkIf cfg.steam.enableSls { - environment.systemPackages = [ - inputs.sls-steam.packages.${pkgs.stdenv.hostPlatform.system}.wrapped - ]; - home-manager.users.${username} = { - xdg.desktopEntries = { - steam = { - name = "Steam"; - comment = "Library modified Steam client"; - exec = "${ - lib.getExe' inputs.sls-steam.packages.${pkgs.stdenv.hostPlatform.system}.wrapped "SLSsteam" - } %U"; - icon = "steam"; - terminal = false; - type = "Application"; - categories = [ - "Game" - "Utility" - ]; - mimeType = [ "x-scheme-handler/steamcmd" ]; - }; - }; - }; - }) - ] - )) - - # --- VR SUPPORT --- - (lib.mkIf cfg.vr.enable { - services.wivrn = { - enable = true; - openFirewall = true; - highPriority = true; - steam.importOXRRuntimes = true; - # defaultRuntime = true; - }; - environment.systemPackages = [ pkgs.android-tools ]; - users.users.${username}.extraGroups = [ "adbusers" ]; - }) - ]; -} |
