From e67dd381d33681ce876030db03bc1e58b6ad075d Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 12 Feb 2022 16:09:44 +0300 Subject: [PATCH 1/3] nixos/pipewire: default to wireplumber --- .../from_md/release-notes/rl-2205.section.xml | 13 +++++++++++++ nixos/doc/manual/release-notes/rl-2205.section.md | 4 ++++ .../desktops/pipewire/pipewire-media-session.nix | 5 ++--- .../services/desktops/pipewire/wireplumber.nix | 11 +++++++---- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 7502214c86be..77cbc796931e 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -694,6 +694,19 @@ olimorris/onedarkpro.nvim). + + + services.pipewire.enable will default to + enabling the WirePlumber session manager instead of + pipewire-media-session. pipewire-media-session is deprecated + by upstream and not recommended, but can still be manually + enabled by setting + services.pipewire.media-session.enable to + true and + services.pipewire.wireplumber.enable to + false. + +
diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index c96f898505a2..6e51810a7e0f 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -218,6 +218,10 @@ In addition to numerous new and upgraded packages, this release has the followin - `pkgs.vimPlugins.onedark-nvim` now refers to [navarasu/onedark.nvim](https://github.com/navarasu/onedark.nvim) (formerly refers to [olimorris/onedarkpro.nvim](https://github.com/olimorris/onedarkpro.nvim)). +- `services.pipewire.enable` will default to enabling the WirePlumber session manager instead of pipewire-media-session. + pipewire-media-session is deprecated by upstream and not recommended, but can still be manually enabled by setting + `services.pipewire.media-session.enable` to `true` and `services.pipewire.wireplumber.enable` to `false`. + ## Other Notable Changes {#sec-release-22.05-notable-changes} diff --git a/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix b/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix index f7a03a4a3eaf..109c91134b99 100644 --- a/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix +++ b/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix @@ -38,9 +38,8 @@ in { services.pipewire.media-session = { enable = mkOption { type = types.bool; - default = config.services.pipewire.enable; - defaultText = literalExpression "config.services.pipewire.enable"; - description = "Example pipewire session manager"; + default = false; + description = "Whether to enable the deprecated example Pipewire session manager"; }; package = mkOption { diff --git a/nixos/modules/services/desktops/pipewire/wireplumber.nix b/nixos/modules/services/desktops/pipewire/wireplumber.nix index ad96dc1f9745..52ec17b95db4 100644 --- a/nixos/modules/services/desktops/pipewire/wireplumber.nix +++ b/nixos/modules/services/desktops/pipewire/wireplumber.nix @@ -8,15 +8,18 @@ in options = { services.pipewire.wireplumber = { - enable = lib.mkEnableOption "A modular session / policy manager for PipeWire"; + enable = lib.mkOption { + type = lib.types.bool; + default = config.services.pipewire.enable; + defaultText = lib.literalExpression "config.services.pipewire.enable"; + description = "Whether to enable Wireplumber, a modular session / policy manager for PipeWire"; + }; package = lib.mkOption { type = lib.types.package; default = pkgs.wireplumber; defaultText = lib.literalExpression "pkgs.wireplumber"; - description = '' - The wireplumber derivation to use. - ''; + description = "The wireplumber derivation to use."; }; }; }; From 495a8d9bb3ad0fd3a65ad3f3dd8eb3b529a4521c Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 20 Feb 2022 10:00:45 +0300 Subject: [PATCH 2/3] wireplumber: also install system units --- pkgs/development/libraries/pipewire/wireplumber.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/pipewire/wireplumber.nix b/pkgs/development/libraries/pipewire/wireplumber.nix index 9ab197278d0a..b24803605883 100644 --- a/pkgs/development/libraries/pipewire/wireplumber.nix +++ b/pkgs/development/libraries/pipewire/wireplumber.nix @@ -67,6 +67,7 @@ stdenv.mkDerivation rec { "-Delogind=disabled" "-Ddoc=${mesonEnableFeature enableDocs}" "-Dintrospection=${mesonEnableFeature enableGI}" + "-Dsystemd-system-service=true" ]; passthru.updateScript = nix-update-script { From a55e181257801cfd0d3f3aa1e18bdf208779e382 Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 21 Feb 2022 10:41:03 +0300 Subject: [PATCH 3/3] wireplumber: install system units to the right place --- pkgs/development/libraries/pipewire/wireplumber.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/pipewire/wireplumber.nix b/pkgs/development/libraries/pipewire/wireplumber.nix index b24803605883..cde73edf7904 100644 --- a/pkgs/development/libraries/pipewire/wireplumber.nix +++ b/pkgs/development/libraries/pipewire/wireplumber.nix @@ -68,6 +68,7 @@ stdenv.mkDerivation rec { "-Ddoc=${mesonEnableFeature enableDocs}" "-Dintrospection=${mesonEnableFeature enableGI}" "-Dsystemd-system-service=true" + "-Dsystemd-system-unit-dir=${placeholder "out"}/lib/systemd/system" ]; passthru.updateScript = nix-update-script {