feat(pipewire): Add alsa integration

Any programs running through alsa only (such as spotify_player on
voidlinux) should now also work correctly through the pipewire stack.
This commit is contained in:
Marty Oehme 2025-03-06 20:06:46 +01:00
parent 317b931de0
commit dc78da4d03
Signed by: Marty
GPG key ID: 4E535BC19C61886E
5 changed files with 56 additions and 1 deletions
roles
display_manager
gnupg/tasks
pipewire/tasks

View file

@ -0,0 +1,8 @@
---
# should the system automatically login as the primary user
dm_auto_login: true
# default command to run on login
# can be pause if we use services to start graphical env
# otherwise a shell, e.g. zsh makes sense
dm_command: pause

View file

@ -22,6 +22,15 @@
mode: 0644 mode: 0644
force: true force: true
- name: Enable power management for _greeter user
ansible.builtin.copy:
content: "_greeter ALL=(ALL) NOPASSWD: /usr/sbin/shutdown, /usr/bin/reboot, /usr/bin/poweroff, /usr/bin/shutdown"
dest: "/etc/sudoers.d/30-greeter"
owner: root
group: root
mode: 0644
force: true
- name: Activate greetd service - name: Activate greetd service
ansible.builtin.file: ansible.builtin.file:
src: "/etc/sv/greetd" src: "/etc/sv/greetd"

View file

@ -5,9 +5,14 @@ vt = 7
# The default session, also known as the greeter. # The default session, also known as the greeter.
[default_session] [default_session]
command = "tuigreet --cmd zsh" command = "tuigreet --cmd {{ dm_command }}"
command = "tuigreet --power-reboot 'sudo reboot' --power-shutdown 'sudo poweroff' --cmd {{ dm_command }}"
user = "{{ greeter_user }}" user = "{{ greeter_user }}"
[initial_session]
command = "{{ dm_command }}"
user = "{{ user_name | default('root') }}"
# `agreety` is the bundled agetty/login-lookalike. You can replace `/bin/sh` # `agreety` is the bundled agetty/login-lookalike. You can replace `/bin/sh`
# with whatever you want started, such as `sway`. # with whatever you want started, such as `sway`.
# command = "agreety --cmd /bin/sh" # command = "agreety --cmd /bin/sh"

View file

@ -3,6 +3,7 @@
name: name:
- gnupg - gnupg
- gnupg2-scdaemon - gnupg2-scdaemon
- keychain
state: "{{ desired_package_state | default('present') }}" state: "{{ desired_package_state | default('present') }}"
tags: packages tags: packages

View file

@ -45,5 +45,37 @@
src: "/usr/share/examples/pipewire/20-pipewire-pulse.conf" src: "/usr/share/examples/pipewire/20-pipewire-pulse.conf"
dest: "/etc/pipewire/pipewire.conf.d/20-pipewire-pulse.conf" dest: "/etc/pipewire/pipewire.conf.d/20-pipewire-pulse.conf"
state: link state: link
tags: pulseaudio
- name: Install alsa integration package
community.general.xbps:
name:
- alsa-pipewire
state: "{{ desired_package_state | default('present') }}"
tags:
- packages
- alsa
- name: Set up wireplumber to auto start
ansible.builtin.file:
dest: "/etc/alsa/conf.d"
state: directory
- name: Enable alsa-pipewire interface
become: true
ansible.builtin.file:
force: "yes"
src: "/usr/share/alsa/alsa.conf.d/50-pipewire.conf"
dest: "/etc/alsa/conf.d/50-pipewire.conf"
state: link
tags: alsa
- name: Make alsa-pipewire interface default for alsa
ansible.builtin.file:
force: "yes"
src: "/usr/share/alsa/alsa.conf.d/99-pipewire-default.conf"
dest: "/etc/alsa/conf.d/99-pipewire-default.conf"
state: link
tags: alsa
# TODO: Find way to install and enable pipewire-roc-sink module (and enable ~/.config/pipewire/pipewire.conf.d/roc-sink.conf) # TODO: Find way to install and enable pipewire-roc-sink module (and enable ~/.config/pipewire/pipewire.conf.d/roc-sink.conf)