Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/default_profiles/applications
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2024-05-10 15:56:28 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2024-05-10 15:56:28 +0200
commit683da22298abbd90f51d4dd38a7ec4b0dfb04555 (patch)
treeec2ac04967f9277df038edc362201937b331abe5 /archinstall/default_profiles/applications
parentaf7ab9833c9f9944874f0162ae0975175ddc628d (diff)
parent3381cd55673e5105697d354cf4a1be9a7bcef062 (diff)
merged with upstreamHEADmaster
Diffstat (limited to 'archinstall/default_profiles/applications')
-rw-r--r--archinstall/default_profiles/applications/__init__.py0
-rw-r--r--archinstall/default_profiles/applications/pipewire.py40
2 files changed, 40 insertions, 0 deletions
diff --git a/archinstall/default_profiles/applications/__init__.py b/archinstall/default_profiles/applications/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/archinstall/default_profiles/applications/__init__.py
diff --git a/archinstall/default_profiles/applications/pipewire.py b/archinstall/default_profiles/applications/pipewire.py
new file mode 100644
index 00000000..4cb75968
--- /dev/null
+++ b/archinstall/default_profiles/applications/pipewire.py
@@ -0,0 +1,40 @@
+from typing import List, Union, Any, TYPE_CHECKING
+
+import archinstall
+
+from archinstall.default_profiles.profile import Profile, ProfileType
+from archinstall.lib.models import User
+
+if TYPE_CHECKING:
+ from archinstall.lib.installer import Installer
+ _: Any
+
+
+class PipewireProfile(Profile):
+ def __init__(self):
+ super().__init__('Pipewire', ProfileType.Application)
+
+ @property
+ def packages(self) -> List[str]:
+ return [
+ 'pipewire',
+ 'pipewire-alsa',
+ 'pipewire-jack',
+ 'pipewire-pulse',
+ 'gst-plugin-pipewire',
+ 'libpulse',
+ 'wireplumber'
+ ]
+
+ def _enable_pipewire_for_all(self, install_session: 'Installer'):
+ users: Union[User, List[User]] = archinstall.arguments.get('!users', [])
+ if not isinstance(users, list):
+ users = [users]
+
+ for user in users:
+ install_session.arch_chroot('systemctl enable --user pipewire-pulse.service', run_as=user.username)
+
+ def install(self, install_session: 'Installer'):
+ super().install(install_session)
+ install_session.add_additional_packages(self.packages)
+ self._enable_pipewire_for_all(install_session)