From 7a3c74421cffd239762d76f3d4892e5b7abfb560 Mon Sep 17 00:00:00 2001 From: willifan Date: Sat, 4 Jan 2025 00:24:49 +0100 Subject: [PATCH] add emulation option --- hosts/Lillie/default.nix | 1 + hosts/Puenktchen/default.nix | 1 + modules/default/common/desktop/default.nix | 1 - modules/default/common/desktop/games/default.nix | 1 + modules/default/common/desktop/{ => games}/emulation.nix | 2 +- modules/default/common/options.nix | 8 ++++++++ 6 files changed, 12 insertions(+), 2 deletions(-) rename modules/default/common/desktop/{ => games}/emulation.nix (77%) diff --git a/hosts/Lillie/default.nix b/hosts/Lillie/default.nix index 02a808c..ee671fd 100644 --- a/hosts/Lillie/default.nix +++ b/hosts/Lillie/default.nix @@ -12,6 +12,7 @@ desktop = { enable = true; autostart.enable = false; + emulation.enable = true; hyprland = { hardware.Lillie = true; diff --git a/hosts/Puenktchen/default.nix b/hosts/Puenktchen/default.nix index caa0592..97440b4 100644 --- a/hosts/Puenktchen/default.nix +++ b/hosts/Puenktchen/default.nix @@ -10,6 +10,7 @@ desktop = { enable = true; + emulation.enable = true; hyprlock.enable = false; hypridle.enable = false; diff --git a/modules/default/common/desktop/default.nix b/modules/default/common/desktop/default.nix index 649c048..352e402 100644 --- a/modules/default/common/desktop/default.nix +++ b/modules/default/common/desktop/default.nix @@ -4,7 +4,6 @@ ./applications.nix ./autostart.nix ./boot.nix - ./emulation.nix ./keyboard.nix ./nfs-client.nix ./nix-ld.nix diff --git a/modules/default/common/desktop/games/default.nix b/modules/default/common/desktop/games/default.nix index 965fc7d..fad0a49 100644 --- a/modules/default/common/desktop/games/default.nix +++ b/modules/default/common/desktop/games/default.nix @@ -4,6 +4,7 @@ imports = [ ./ROG_Pugio_II_fixes.nix + ./emulation.nix ./mangohud.nix ./minecraft.nix ./moonlight.nix diff --git a/modules/default/common/desktop/emulation.nix b/modules/default/common/desktop/games/emulation.nix similarity index 77% rename from modules/default/common/desktop/emulation.nix rename to modules/default/common/desktop/games/emulation.nix index efa20e6..aa9f9ac 100644 --- a/modules/default/common/desktop/emulation.nix +++ b/modules/default/common/desktop/games/emulation.nix @@ -1,5 +1,5 @@ { lib, config, pkgs, ... }: -lib.mkIf config.desktop.enable { +lib.mkIf config.desktop.emulation.enable { environment.systemPackages = with pkgs; [ melonDS dolphin-emu diff --git a/modules/default/common/options.nix b/modules/default/common/options.nix index ec6c81b..bc3755d 100644 --- a/modules/default/common/options.nix +++ b/modules/default/common/options.nix @@ -2,14 +2,22 @@ { options = { desktop = { + enable = lib.mkOption { default = false; type = lib.types.bool; }; + + emulation.enable = lib.mkOption { + default = false; + type = lib.types.bool; + }; + windowManager = lib.mkOption { default = "Hyprland"; type = lib.types.str; }; + }; server.enable = lib.mkOption { default = false;