From 240f688ccefa7bddb56efe5bc41a457c96792e42 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 2 Jan 2022 16:36:50 +0100 Subject: Adding a Pipewire application profile (#821) * Adding a Pipewire application profile This to better manage the pipewire setup process and minimize guided a bit. This also adds the concept of @archinstall.plugin decorators to add a plugin in run-time. Which pipewire uses to detect user creation and enable the pipewire-pulse service for new users. * Forgot to run .install() on pipewire Application() * Backwards compatible variable insertion for installation session --- profiles/applications/pipewire.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 profiles/applications/pipewire.py (limited to 'profiles/applications') diff --git a/profiles/applications/pipewire.py b/profiles/applications/pipewire.py new file mode 100644 index 00000000..38554000 --- /dev/null +++ b/profiles/applications/pipewire.py @@ -0,0 +1,14 @@ +import archinstall +import logging + +# Define the package list in order for lib to source +# which packages will be installed by this profile +__packages__ = ["pipewire", "pipewire-alsa", "pipewire-jack", "pipewire-media-session", "pipewire-pulse", "gst-plugin-pipewire", "libpulse"] + +archinstall.log('Installing pipewire', level=logging.INFO) +archinstall.storage['installation_session'].add_additional_packages(__packages__) + +@archinstall.plugin +def on_user_created(installation :archinstall.Installer, user :str): + archinstall.log(f"Enabling pipewire-pulse for {user}", level=logging.INFO) + installation.chroot('systemctl enable --user pipewire-pulse.service', run_as=user) \ No newline at end of file -- cgit v1.2.3-70-g09d2