about summary refs log tree commit diff
path: root/modules/desktop
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-02-08 16:38:19 -0800
committerFranck Cuny <franck@fcuny.net>2022-02-08 16:38:19 -0800
commitbbbdb2c9ea9c6309d6382c00c7d6207355b6694a (patch)
tree8996c38bfbd3756dd0ba0d2f627997167814577c /modules/desktop
parentsystems: fix typo (diff)
downloadworld-bbbdb2c9ea9c6309d6382c00c7d6207355b6694a.tar.gz
desktop: add sound
Let's use pipewire.
Diffstat (limited to '')
-rw-r--r--modules/desktop/default.nix1
-rw-r--r--modules/desktop/sound.nix20
2 files changed, 21 insertions, 0 deletions
diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix
index c626586..5cd6fbd 100644
--- a/modules/desktop/default.nix
+++ b/modules/desktop/default.nix
@@ -3,5 +3,6 @@
   imports = [
     ./xserver.nix
     ./fonts.nix
+    ./sound.nix
   ];
 }
diff --git a/modules/desktop/sound.nix b/modules/desktop/sound.nix
new file mode 100644
index 0000000..95c7c75
--- /dev/null
+++ b/modules/desktop/sound.nix
@@ -0,0 +1,20 @@
+{pkgs, config, lib, ...}:
+
+{
+  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
+  ];
+
+  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;
+}