From a7087e2904a16d47fc0f6333286e3293f8a49353 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Wed, 31 May 2023 10:17:17 -0400 Subject: [PATCH] Add osu-stable This works, and without putting wine directly in $PATH, which is kinda cool. --- desktop/pipewire/default.nix | 2 ++ flake.lock | 58 ++++++++++++++++++++++++++++++++++++ flake.nix | 11 ++++++- games/default.nix | 2 ++ 4 files changed, 72 insertions(+), 1 deletion(-) diff --git a/desktop/pipewire/default.nix b/desktop/pipewire/default.nix index 89bccdd..079a9f9 100644 --- a/desktop/pipewire/default.nix +++ b/desktop/pipewire/default.nix @@ -9,6 +9,8 @@ pulse.enable = true; jack.enable = true; + + lowLatency.enable = true; }; security.rtkit.enable = true; diff --git a/flake.lock b/flake.lock index b7eed36..e46136a 100644 --- a/flake.lock +++ b/flake.lock @@ -37,6 +37,24 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1675933616, + "narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "47478a4a003e745402acf63be7f9a092d51b83d7", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -122,6 +140,27 @@ "type": "github" } }, + "nix-gaming": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1685085949, + "narHash": "sha256-m8fxr41f9JBQYUm2IU0WcE61Y7fNkIW1P4OnufRfkMw=", + "owner": "fufexan", + "repo": "nix-gaming", + "rev": "d60973a276d84059401afd1c1488c9a15bd9f43e", + "type": "github" + }, + "original": { + "owner": "fufexan", + "repo": "nix-gaming", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1684935479, @@ -138,11 +177,30 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1675183161, + "narHash": "sha256-Zq8sNgAxDckpn7tJo7V1afRSk2eoVbu3OjI1QklGLNg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e1e1b192c1a5aab2960bf0a0bd53a2e8124fa18e", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "hypr-contrib": "hypr-contrib", "hyprland": "hyprland", + "nix-gaming": "nix-gaming", "nixpkgs": "nixpkgs", "stylix": "stylix" } diff --git a/flake.nix b/flake.nix index f872a5e..9644054 100644 --- a/flake.nix +++ b/flake.nix @@ -24,9 +24,14 @@ url = "github:hyprwm/contrib"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nix-gaming = { + url = "github:fufexan/nix-gaming"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, home-manager, hyprland, stylix, hypr-contrib, ... }@attrs: { + outputs = { self, nixpkgs, home-manager, hyprland, stylix, hypr-contrib, nix-gaming, ... }@attrs: { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; @@ -34,6 +39,7 @@ home-manager.nixosModules.home-manager hyprland.nixosModules.default stylix.nixosModules.stylix + nix-gaming.nixosModules.pipewireLowLatency ./applications ./common.nix ./user.nix @@ -43,11 +49,14 @@ ./host ./terminal { + hardware.opengl.driSupport32Bit = true; + boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; environment.systemPackages = [ hypr-contrib.packages."x86_64-linux".grimblast + nix-gaming.packages."x86_64-linux".osu-stable ]; environment.sessionVariables = { diff --git a/games/default.nix b/games/default.nix index 8cdee00..3ed852c 100644 --- a/games/default.nix +++ b/games/default.nix @@ -6,6 +6,8 @@ ./srb2 ]; + programs.gamemode.enable = true; + environment.systemPackages = with pkgs; [ typespeed ];