From 23bd5b054e1c6029c2126ef9a2918d928610189c Mon Sep 17 00:00:00 2001 From: Octelly Date: Mon, 23 Dec 2024 12:39:25 +0100 Subject: [PATCH] poorly written emulation module should really switch to the snowflake branch already --- hosts/ocean-desktop/configuration.nix | 4 ++++ modules/desktop/gaming/emulation.nix | 28 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 modules/desktop/gaming/emulation.nix diff --git a/hosts/ocean-desktop/configuration.nix b/hosts/ocean-desktop/configuration.nix index 2f045ec..7a4fd62 100755 --- a/hosts/ocean-desktop/configuration.nix +++ b/hosts/ocean-desktop/configuration.nix @@ -7,6 +7,10 @@ olympus.enable = false; minecraft.enable = true; sunshine.enable = true; + emulation = { + enable = true; + switch = true; + }; }; awesome = { enable = true; diff --git a/modules/desktop/gaming/emulation.nix b/modules/desktop/gaming/emulation.nix new file mode 100755 index 0000000..ae02e0a --- /dev/null +++ b/modules/desktop/gaming/emulation.nix @@ -0,0 +1,28 @@ +{ config, pkgs, lib, inputs, system, ... }: + +with builtins; +with lib; +let cfg = config.modules.desktop.gaming.emulation; +in { + options.modules.desktop.gaming.emulation = { + enable = mkEnableOption "enable the emulation module"; + switch = mkEnableOption "Nintendo Switch"; + }; + + config = mkIf cfg.enable { + + programs.gamemode = { + enable = true; + enableRenice = true; + }; + + environment.systemPackages = with pkgs; [ + # helpful overlays and such + mangohud + vkbasalt + # a configurator for them + goverlay + ] + ++ optional cfg.switch pkgs.ryujinx; + }; +}