From c33367bdc709973c94e745b92e7be9687b9a4cb3 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sun, 21 Jan 2024 10:31:46 +0000 Subject: [PATCH] Move games into system/games.nix (rename of steam.nix) Add RetroArch with some cores, add to games workspace --- Makefile | 8 ++++---- flake.nix | 5 ++--- home/games/default.nix | 1 - home/games/marathon.nix | 7 ------- home/games/minecraft.nix | 1 - home/hyprland/config.nix | 2 +- system/games.nix | 24 ++++++++++++++++++++++++ system/gamescope.nix | 2 +- system/steam.nix | 14 -------------- 9 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 home/games/default.nix delete mode 100644 home/games/marathon.nix delete mode 100644 home/games/minecraft.nix create mode 100644 system/games.nix delete mode 100644 system/steam.nix diff --git a/Makefile b/Makefile index 23c3a419..da37be66 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ -.PHONY: test build mu +.PHONY: build test switch + +build: + nixos-rebuild build --flake . test: sudo nixos-rebuild test --flake . -build: - sudo nixos-rebuild build --flake . - switch: sudo nixos-rebuild switch --flake . diff --git a/flake.nix b/flake.nix index ab7c1f07..fa4f5fd8 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ }; }; - outputs = { self, nixpkgs, home-manager, stylix, ... }: + outputs = { nixpkgs, home-manager, stylix, ... }: let default = { hostName = "Atlas"; @@ -283,8 +283,7 @@ system = "x86_64-linux"; in systemConfig { inherit hostName user system; - systemModules = default.systemModules ++ [ ./system/steam.nix ]; - homeModules = default.homeModules ++ [ ./home/games/default.nix ]; + systemModules = default.systemModules ++ [ ./system/games.nix ]; }; }; diff --git a/home/games/default.nix b/home/games/default.nix deleted file mode 100644 index e5903a40..00000000 --- a/home/games/default.nix +++ /dev/null @@ -1 +0,0 @@ -{ ... }: { imports = [ ./minecraft.nix ./marathon.nix ]; } diff --git a/home/games/marathon.nix b/home/games/marathon.nix deleted file mode 100644 index 1d0f98e5..00000000 --- a/home/games/marathon.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ - alephone-marathon - alephone-durandal - alephone-infinity - ]; -} diff --git a/home/games/minecraft.nix b/home/games/minecraft.nix deleted file mode 100644 index 4a09aafa..00000000 --- a/home/games/minecraft.nix +++ /dev/null @@ -1 +0,0 @@ -{ pkgs, ... }: { home.packages = with pkgs; [ prismlauncher ]; } diff --git a/home/hyprland/config.nix b/home/hyprland/config.nix index 478ab81e..4165c2d6 100644 --- a/home/hyprland/config.nix +++ b/home/hyprland/config.nix @@ -226,7 +226,7 @@ in '' bind = SUPER, G, moveworkspacetomonitor, name:games current bind = SUPER, G, workspace, name:games bind = SUPER SHIFT, G, movetoworkspace, name:games - windowrule = workspace name:games silent, (steam) + windowrule = workspace name:games silent, (steam|org.libretro.RetroArch) windowrulev2 = float,title:(Friends List),class:(steam) windowrulev2 = float,title:(Steam Settings),class:(steam) diff --git a/system/games.nix b/system/games.nix new file mode 100644 index 00000000..fe995ef3 --- /dev/null +++ b/system/games.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: { + environment.systemPackages = with pkgs; [ + alephone-marathon + alephone-durandal + alephone-infinity + cemu + prismlauncher + (retroarch.override { + cores = with libretro; [ dolphin mgba mupen64plus ]; + }) + ]; + hardware.steam-hardware.enable = true; + programs = { + xwayland.enable = true; + gamescope = { + enable = true; + capSysNice = true; + }; + steam = { + enable = true; + remotePlay.openFirewall = true; + }; + }; +} diff --git a/system/gamescope.nix b/system/gamescope.nix index 76becc72..ce819082 100644 --- a/system/gamescope.nix +++ b/system/gamescope.nix @@ -1,5 +1,5 @@ { ... }: { - imports = [ ./desktop.nix ./steam.nix ]; + imports = [ ./desktop.nix ./games.nix ]; services = { greetd.settings = let command = '' diff --git a/system/steam.nix b/system/steam.nix deleted file mode 100644 index 62499a70..00000000 --- a/system/steam.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ ... }: { - hardware.steam-hardware.enable = true; - programs = { - xwayland.enable = true; - gamescope = { - enable = true; - capSysNice = true; - }; - steam = { - enable = true; - remotePlay.openFirewall = true; - }; - }; -}