From 880ea1d8dd795c504473594be6e2a162e4533057 Mon Sep 17 00:00:00 2001 From: derped Date: Wed, 20 Nov 2024 15:22:46 +0100 Subject: [PATCH] Add pipewire audio service. --- machines/Lilim/options.nix | 11 ++++++----- machines/Sheol/options.nix | 3 ++- services/pipewire.nix | 13 +++++++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 services/pipewire.nix diff --git a/machines/Lilim/options.nix b/machines/Lilim/options.nix index 7c54237..64f2fe2 100644 --- a/machines/Lilim/options.nix +++ b/machines/Lilim/options.nix @@ -30,22 +30,23 @@ with lib; { "base" "cpp" "dict" - "nodejs" - "latex" "extra" "haskell" + "latex" "mail_utils" + "nodejs" "python3" "xpkgs" ]; services = [ + "cups" "desktop" "desktop::sway" - "udev" - "cups" - "mullvad" "mariaDB" + "mullvad" + "pipewire" "podman" + "udev" ]; firewall = { enable = true; diff --git a/machines/Sheol/options.nix b/machines/Sheol/options.nix index 73f1e32..d5792a7 100644 --- a/machines/Sheol/options.nix +++ b/machines/Sheol/options.nix @@ -27,8 +27,9 @@ "desktop" "desktop::sway" # "kodi" - "openssh" "mullvad" + "openssh" + "pipewire" ]; firewall = { enable = true; diff --git a/services/pipewire.nix b/services/pipewire.nix new file mode 100644 index 0000000..08a59ce --- /dev/null +++ b/services/pipewire.nix @@ -0,0 +1,13 @@ +{ lib, config, ... }: + +lib.mkIf (lib.elem "pipewire" config.machine.services) { + hardware.pulseaudio.enable = lib.mkForce false; + services.pipewire = { + enable = true; + wireplumber.enable = true; + audio.enable = true; + alsa.enable = true; + pulse.enable = true; + jack.enable = true; + }; +}