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; })) ]; }