Converting systemctl call to a simple ln call for debus reasons (#2835)

* Converting systemctl call to a simple ln call for debus reasons #2764
This commit is contained in:
Anton Hvornum 2024-11-16 18:55:21 +01:00 committed by GitHub
parent 87fe1dbd8a
commit 58e4a94fdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 1 deletions

View File

@ -32,7 +32,16 @@ class PipewireProfile(Profile):
users = [users]
for user in users:
install_session.arch_chroot('systemctl enable --user pipewire-pulse.service', run_as=user.username)
# Create the full path for enabling the pipewire systemd items
service_dir = install_session.target / "home" / user.username / ".config" / "systemd" / "user" / "default.target.wants"
service_dir.mkdir(parents=True, exist_ok=True)
# Set ownership of the entire user catalogue
install_session.arch_chroot(f'chown -R {user.username}:{user.username} /home/{user.username}')
# symlink in the correct pipewire systemd items
install_session.arch_chroot(f'ln -s /usr/lib/systemd/user/pipewire-pulse.service /home/{user.username}/.config/systemd/user/default.target.wants/pipewire-pulse.service', run_as=user.username)
install_session.arch_chroot(f'ln -s /usr/lib/systemd/user/pipewire-pulse.socket /home/{user.username}/.config/systemd/user/default.target.wants/pipewire-pulse.socket', run_as=user.username)
def install(self, install_session: 'Installer') -> None:
super().install(install_session)