diff --git a/gaming.nix b/gaming.nix deleted file mode 100644 index c9ecc8b..0000000 --- a/gaming.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, pkgs, ... }: -{ - assertions = [ - { - assertion = config.services.xserver.enable; - message = "Gaming does not work without a desktop!"; - } - ]; - - programs = { - steam = { - enable = true; - extraCompatPackages = [ pkgs.proton-ge-bin ]; - }; - gamemode.enable = true; - }; -} diff --git a/hardware-specific/nvidia.nix b/hardware-specific/nvidia.nix deleted file mode 100644 index 64ee5c7..0000000 --- a/hardware-specific/nvidia.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, pkgs, ... }: -{ - hardware = { - graphics.enable = true; - nvidia = { - open = true; - forceFullCompositionPipeline = true; - }; - }; - - services = { - xserver = pkgs.lib.mkIf config.services.xserver.enable { - videoDrivers = [ "nvidia" ]; - }; - }; -} diff --git a/machine-confs/gaming.nix b/machine-confs/gaming.nix deleted file mode 100644 index 8d994d9..0000000 --- a/machine-confs/gaming.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ pkgs, ... }: -{ - networking.hostName = "gaming"; - - imports = [ - ../base.nix - ../users/vili.nix - ../desktop.nix - ../gaming.nix - ../services/sunshine.nix - ../hardware-specific/nvidia.nix - ]; - - services.clatd = { - enable = true; - }; - - users.users.vili.hashedPasswordFile = pkgs.lib.mkForce null; - - swapDevices = pkgs.lib.mkForce [ - { - device = "/var/lib/swapfile"; - size = 4 * 1024; - } - ]; - - # HARDWARE SPECIFIC - services.qemuGuest.enable = true; -} diff --git a/services/sunshine.nix b/services/sunshine.nix deleted file mode 100644 index bbfb3f3..0000000 --- a/services/sunshine.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ pkgs, config, ... }: -let - sunshineCuda = pkgs.sunshine.override { - cudaSupport = true; - stdenv = pkgs.cudaPackages.backendStdenv; - }; - resolution_list = [ - "1920x1080" - "2400x1080" - "2160x1440" - "2560x1440" - "3840x2160" - ]; -in -{ - assertions = [ - { - assertion = config.services.xserver.enable; - message = "Game streaming does not work without a desktop!"; - } - ]; - - services.sunshine = { - package = sunshineCuda; - enable = true; - autoStart = true; - capSysAdmin = true; - openFirewall = true; - settings = { - min_log_level = "debug"; - encoder = "nvenc"; - sunshine_name = "Gaming NixOS"; - resolutions = '' - [ - 1920x1080, - 2400x1080, - 2160x1440, - 2560x1440, - 3840x2160 - ] - ''; - fps = '' - [30, 60, 90, 120] - ''; - address_family = "both"; - }; - applications = { - apps = - ( - resolutions: - map (resolution: { - name = "${resolution} Desktop"; - prep-cmd = [ - { - do = "${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-0 --mode ${resolution}"; - undo = "${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-0 --auto"; - } - ]; - exclude-global-prep-cmd = "false"; - auto-detach = "true"; - }) resolutions - ) - resolution_list; - }; - }; -}