feat(audio): Add pipewire stack

This commit is contained in:
Marty Oehme 2025-02-23 14:49:55 +01:00 committed by Marty Oehme
parent 3bcf928bc5
commit 3de5e42b28
3 changed files with 74 additions and 19 deletions

View file

@ -1,25 +1,6 @@
- name: Set up primary user
hosts: target_system
become: true
vars:
user_name: marty
user_pass: marty
user_shell: zsh
user_groups:
- wheel
- _seatd # TODO: This will error if it does not exist (seatd not installed)
- audio
- dialout
- disk
- input
- kvm
- lp
- plugdev
- scanner
- storage
- usbmon
- video
tasks:
- name: Enable sudo for "wheel" group
ansible.builtin.lineinfile:

View file

@ -1,6 +1,7 @@
- name: Install void wayland environment
hosts: target_system
become: true
tags: wayland
tasks:
- name: Install intel wayland drivers
community.general.xbps:
@ -31,3 +32,56 @@
- xdg-desktop-portal
- xdg-desktop-portal-wlr
state: present
- name: Install audio for wayland
hosts: target_system
become: true
tags: audio
tasks:
- name: Put user in audio group
ansible.builtin.user:
name: "{{ user_name }}"
groups: [audio, video]
append: true
- name: Install pipewire
community.general.xbps:
name:
- pipewire
state: present
notify: installed-pipewire
- name: Install pipewire
community.general.xbps:
name:
- libspa-bluetooth
state: present
tags: bluetooth
handlers:
- name: Set up wireplumber to auto start
ansible.builtin.file:
dest: "/etc/pipewire/pipewire.conf.d"
state: directory
listen: installed-pipewire
# FIXME: Does not work automatically for some reason?
- name: Set up wireplumber to auto start
ansible.builtin.file:
force: "yes"
src: "/usr/share/examples/wireplumber/10-wireplumber.conf"
dest: "/etc/pipewire/pipewire.conf.d/10-wireplumber.conf"
state: link
listen: installed-pipewire
- name: Enable pipewire-pulse interface
ansible.builtin.file:
force: "yes"
src: "/usr/share/examples/pipewire/20-pipewire-pulse.conf"
dest: "/etc/pipewire/pipewire.conf.d/20-pipewire-pulse.conf"
state: link
listen: installed-pipewire
## TODO: Enable its start in river init script
#
# TODO: Find way to install and enable pipewire-roc-sink module (and enable ~/.config/pipewire/pipewire.conf.d/roc-sink.conf)

View file

@ -1,3 +1,21 @@
all:
vars:
user_name: voidboi
user_pass: voidlinux
user_shell: zsh
user_groups:
- wheel
- _seatd # TODO: This will error if it does not exist? (seatd not installed)
- dialout
- disk
- input
- kvm
- lp
- plugdev
- scanner
- storage
- usbmon
# example separation of packages: GUIs and DEs in workstation, only terminal in headless
workstation:
children:
@ -11,6 +29,8 @@ target_system:
local_target:
vars:
desired_package_state: latest
user_name: marty
user_pass: marty
hostsystem: