From c1421554c639153494e6e8092dbb945dc9c05cc6 Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Fri, 30 Apr 2021 14:32:27 -0400 Subject: [PATCH] enable pipewire --- modules/graphical.nix | 13 +++++++++++-- modules/profiles.nix | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/graphical.nix b/modules/graphical.nix index 8bb3ce7..e12c675 100644 --- a/modules/graphical.nix +++ b/modules/graphical.nix @@ -1,4 +1,7 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: +let + legacy = (config.system.nixos.release == "20.09"); +in { environment.systemPackages = with pkgs; [ brave @@ -47,7 +50,13 @@ programs.steam.enable = true; - hardware.pulseaudio.enable = true; + hardware.pulseaudio.enable = legacy; + services.pipewire = if legacy then { } else { + enable = true; + pulse.enable = true; + alsa.enable = true; + alsa.support32Bit = true; + }; boot.loader.timeout = null; } diff --git a/modules/profiles.nix b/modules/profiles.nix index 58c6038..dde1377 100644 --- a/modules/profiles.nix +++ b/modules/profiles.nix @@ -19,7 +19,7 @@ in }; }) - (mkIf (cfg == "desktop") (import ./graphical.nix { inherit pkgs; })) + (mkIf (cfg == "desktop") (import ./graphical.nix { inherit pkgs config; })) ]; }