From c098a689dfe66dd6c86123858067df3367b96678 Mon Sep 17 00:00:00 2001 From: MFlossmann Date: Sat, 13 Jul 2024 11:38:17 +0200 Subject: [PATCH] outsource gaming --- hosts/remus/configuration.nix | 12 +----------- hosts/remus/home.nix | 2 +- modules/home/bundles/desktop.nix | 2 +- modules/nixOS/bundles/gaming.nix | 16 ++++++++++++++++ 4 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 modules/nixOS/bundles/gaming.nix diff --git a/hosts/remus/configuration.nix b/hosts/remus/configuration.nix index 0df0b1f..db952ef 100644 --- a/hosts/remus/configuration.nix +++ b/hosts/remus/configuration.nix @@ -33,6 +33,7 @@ myNixOS = { bundles.general-desktop.enable = true; + bundles.gaming.enable = true; services.syncthing.enable = true; @@ -102,17 +103,6 @@ package = config.boot.kernelPackages.nvidiaPackages.stable; }; - programs.steam = { - enable = true; - gamescopeSession.enable = true; - }; - programs.gamemode.enable = true; - - environment.systemPackages = with pkgs; [protonup]; - environment.sessionVariables = { - STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/prunebutt/.steam/root/compatibilitytools.d"; - }; - # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; diff --git a/hosts/remus/home.nix b/hosts/remus/home.nix index 9761719..38d8c8e 100644 --- a/hosts/remus/home.nix +++ b/hosts/remus/home.nix @@ -8,7 +8,6 @@ # home.homeDirectory = "/home/prunebutt"; home = let user = "prunebutt"; - _inputs = inputs; in { username = "${user}"; homeDirectory = "/home/${user}"; @@ -37,6 +36,7 @@ inputs.nixvim-config.packages.${pkgs.system}.default ]; + }; myHomeManager = { diff --git a/modules/home/bundles/desktop.nix b/modules/home/bundles/desktop.nix index 8740d9d..d52cca9 100644 --- a/modules/home/bundles/desktop.nix +++ b/modules/home/bundles/desktop.nix @@ -12,7 +12,7 @@ signal-desktop keepassxc - logseq + # logseq ]; programs.firefox = { diff --git a/modules/nixOS/bundles/gaming.nix b/modules/nixOS/bundles/gaming.nix new file mode 100644 index 0000000..e47a816 --- /dev/null +++ b/modules/nixOS/bundles/gaming.nix @@ -0,0 +1,16 @@ +{config, pkgs, ...}:let + mainUser = config.myNixOS.sharedSettings.mainUser; +in { + programs.steam = { + enable = true; + gamescopeSession.enable = true; + # remotePlay.openFirewall = true; + # localNetworkGameTransfers.openFirewall = true; + }; + programs.gamemode.enable = true; + + environment.systemPackages = with pkgs; [protonup]; + environment.sessionVariables = { + STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${mainUser}/.steam/root/compatibilitytools.d"; + }; +}