diff --git a/flake.lock b/flake.lock index 8cdf8bda..5e35bcca 100644 --- a/flake.lock +++ b/flake.lock @@ -205,6 +205,24 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_3" @@ -431,6 +449,28 @@ "type": "github" } }, + "nix-gaming": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "nixpkgs" + ], + "umu": "umu" + }, + "locked": { + "lastModified": 1728783634, + "narHash": "sha256-kh4rf1WWFzx1wcHf6lToksRm1Qu/abEYiojs/sCxAYQ=", + "owner": "fufexan", + "repo": "nix-gaming", + "rev": "6accf747c4a29c2ef26ee1a61e9b2466bc9da7b2", + "type": "github" + }, + "original": { + "owner": "fufexan", + "repo": "nix-gaming", + "type": "github" + } + }, "nix-github-actions": { "inputs": { "nixpkgs": [ @@ -469,6 +509,18 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1727825735, + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1710695816, @@ -551,6 +603,7 @@ "iio-hyprland": "iio-hyprland", "jovian": "jovian", "lanzaboote": "lanzaboote", + "nix-gaming": "nix-gaming", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", @@ -725,6 +778,31 @@ "type": "github" } }, + "umu": { + "inputs": { + "nixpkgs": [ + "nix-gaming", + "nixpkgs" + ] + }, + "locked": { + "dir": "packaging/nix", + "lastModified": 1728772489, + "narHash": "sha256-6sHjXNhPrRXIV1au5jlSXHeqn/QHb9wyRt7V0F5p4PA=", + "ref": "refs/heads/main", + "rev": "475e2b37e34a663b11f8c92b79dd45637a3e848c", + "revCount": 770, + "submodules": true, + "type": "git", + "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" + }, + "original": { + "dir": "packaging/nix", + "submodules": true, + "type": "git", + "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" + } + }, "wallpapers": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 40489c7f..409c4893 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,11 @@ url = "github:nix-community/lanzaboote/v0.4.1"; }; + nix-gaming = { + inputs.nixpkgs.follows = "nixpkgs"; + url = "github:fufexan/nix-gaming"; + }; + nur.url = "github:nix-community/NUR"; stylix = { diff --git a/hosts/pacifidlog/default.nix b/hosts/pacifidlog/default.nix index 14b1725a..11e56224 100644 --- a/hosts/pacifidlog/default.nix +++ b/hosts/pacifidlog/default.nix @@ -15,6 +15,8 @@ in { ./stylix.nix (import ./../../disko/luks-btrfs-subvolumes.nix {disks = ["/dev/nvme0n1"];}) self.inputs.jovian.nixosModules.default + self.inputs.nix-gaming.nixosModules.pipewireLowLatency + self.inputs.nix-gaming.nixosModules.platformOptimizations self.nixosModules.common-base self.nixosModules.common-locale self.nixosModules.common-mauville-share @@ -53,7 +55,7 @@ in { }; }; - systemd.services.handheld-daemon.path = [hhd-ui pkgs.lsof]; + hardware.pulseaudio.enable = lib.mkForce false; jovian = { decky-loader = { @@ -69,6 +71,17 @@ in { desktopSession = "hyprland"; user = "aly"; }; + + steamos = { + enableBluetoothConfig = true; + enableDefaultCmdlineConfig = false; # Already handled by hardware + enableMesaPatches = false; # Doesn't do much, takes a long time to build. + enableProductSerialAccess = true; + enableSysctlConfig = true; # Scheduling etc tweaks + enableVendorRadv = false; # Doesn't do much, takes a long time to build. + enableZram = true; + useSteamOSConfig = false; # No automatic enabling of stuff in the steamos module + }; }; networking.hostName = "pacifidlog"; @@ -95,21 +108,32 @@ in { }) ]; - services.handheld-daemon = { - enable = true; - user = "aly"; + programs.steam.platformOptimizations.enable = true; - package = with pkgs; - handheld-daemon.overrideAttrs (oldAttrs: { - propagatedBuildInputs = - oldAttrs.propagatedBuildInputs - ++ [ - adjustor - ]; - }); + services = { + handheld-daemon = { + enable = true; + user = "aly"; + + package = with pkgs; + handheld-daemon.overrideAttrs (oldAttrs: { + propagatedBuildInputs = + oldAttrs.propagatedBuildInputs + ++ [ + adjustor + ]; + }); + }; + + pipewire.lowLatency = { + enable = true; + quantum = 256; + rate = 48000; + }; }; system.stateVersion = "24.11"; + systemd.services.handheld-daemon.path = [hhd-ui pkgs.lsof]; ar = { apps = {