about summary refs log tree commit diff
path: root/modules/desktop/sound.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/desktop/sound.nix')
-rw-r--r--modules/desktop/sound.nix35
1 files changed, 14 insertions, 21 deletions
diff --git a/modules/desktop/sound.nix b/modules/desktop/sound.nix
index 11c3fc2..95c7c75 100644
--- a/modules/desktop/sound.nix
+++ b/modules/desktop/sound.nix
@@ -1,27 +1,20 @@
 {pkgs, config, lib, ...}:
-with lib;
 
-let
-  xorg = (elem "xorg" config.sys.graphics.desktopProtocols);
-  wayland = (elem "wayland" config.sys.graphics.desktopProtocols);
-  desktopMode = xorg || wayland;
-in {
-  config= mkIf desktopMode {
-    sound.enable = true;
+{
+  sound.enable = true;
 
-    environment.systemPackages = with pkgs; [
-      # We install it to get access to pactl. It isn't enabled or run as a service.
-      pulseaudio
-    ];
+  environment.systemPackages = with pkgs; [
+    # We install it to get access to pactl. It isn't enabled or run as a service.
+    pulseaudio
+  ];
 
-    services.pipewire = {
-      enable = true;
-      # Compatibility shims, adjust according to your needs
-      alsa.enable = true;
-      alsa.support32Bit = true;
-      pulse.enable = true;
-      jack.enable = true;
-    };
-    hardware.pulseaudio.enable = false;
+  services.pipewire = {
+    enable = true;
+    # Compatibility shims, adjust according to your needs
+    alsa.enable = true;
+    alsa.support32Bit = true;
+    pulse.enable = true;
+    jack.enable = true;
   };
+  hardware.pulseaudio.enable = false;
 }