From 31c316d19cd974bb81a5d6de62142ff24db1c78e Mon Sep 17 00:00:00 2001 From: triethyl Date: Tue, 2 Sep 2025 10:48:21 -0400 Subject: reorganized directory structure --- nixos/features/gui/apps/steam.nix | 31 +++++++++++++++++++++++++++++++ nixos/features/gui/apps/virtualbox.nix | 8 ++++++++ nixos/features/gui/apps/vmware.nix | 8 ++++++++ nixos/features/gui/desktops/niri.nix | 9 +++++++++ 4 files changed, 56 insertions(+) create mode 100644 nixos/features/gui/apps/steam.nix create mode 100644 nixos/features/gui/apps/virtualbox.nix create mode 100644 nixos/features/gui/apps/vmware.nix create mode 100644 nixos/features/gui/desktops/niri.nix (limited to 'nixos/features/gui') diff --git a/nixos/features/gui/apps/steam.nix b/nixos/features/gui/apps/steam.nix new file mode 100644 index 0000000..046b814 --- /dev/null +++ b/nixos/features/gui/apps/steam.nix @@ -0,0 +1,31 @@ +{ + config, + pkgs, + lib, + ... +}: let + cfg = config.features.gui.apps.steam; +in { + options.features.gui.apps.steam.enable = lib.mkEnableOption "steam"; + config = lib.mkIf cfg.enable { + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + gamescopeSession.enable = true; + protontricks.enable = true; + extraCompatPackages = with pkgs; [ + proton-ge-bin + ]; + }; + hardware.steam-hardware.enable = true; + programs.gamemode.enable = true; + environment.systemPackages = [pkgs.mangohud]; + + # Steam Launch Options + # Add this to 3D games: + # LD_PRELOAD="" gamescope --force-grab-cursor --backend sdl -bf -W 1600 -H 900 -- %command% + # Add this to 2D games: + # LD_PRELOAD="" gamescope -bf -W 1600 -H 900 -- %command% + }; +} diff --git a/nixos/features/gui/apps/virtualbox.nix b/nixos/features/gui/apps/virtualbox.nix new file mode 100644 index 0000000..0b633c7 --- /dev/null +++ b/nixos/features/gui/apps/virtualbox.nix @@ -0,0 +1,8 @@ +{ config, lib, ... }: let + cfg = config.features.gui.apps.virtualbox; +in { + options.features.gui.apps.virtualbox.enable = lib.mkEnableOption "virtualbox"; + config = lib.mkIf cfg.enable { + virtualisation.virtualbox.host.enable = true; + }; +} diff --git a/nixos/features/gui/apps/vmware.nix b/nixos/features/gui/apps/vmware.nix new file mode 100644 index 0000000..4da3f09 --- /dev/null +++ b/nixos/features/gui/apps/vmware.nix @@ -0,0 +1,8 @@ +{ config, lib, ... }: let + cfg = config.features.gui.apps.vmware; +in { + options.features.gui.apps.vmware.enable = lib.mkEnableOption "vmware"; + config = lib.mkIf cfg.enable { + virtualisation.vmware.host.enable = true; + }; +} diff --git a/nixos/features/gui/desktops/niri.nix b/nixos/features/gui/desktops/niri.nix new file mode 100644 index 0000000..c68a4b6 --- /dev/null +++ b/nixos/features/gui/desktops/niri.nix @@ -0,0 +1,9 @@ +{ config, lib, inputs, ... }: let + cfg = config.features.gui.desktops.niri; +in { + imports = [ inputs.niri.nixosModules.niri ]; + options.features.gui.desktops.niri.enable = lib.mkEnableOption "niri"; + config = lib.mkIf cfg.enable { + programs.niri.enable = true; + }; +} -- cgit v1.2.3