diff --git a/books/void_user.yaml b/books/void_user.yaml index b5c861c..fc1592d 100644 --- a/books/void_user.yaml +++ b/books/void_user.yaml @@ -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: diff --git a/books/void_wayland.yaml b/books/void_wayland.yaml index 54d1c8c..7672138 100644 --- a/books/void_wayland.yaml +++ b/books/void_wayland.yaml @@ -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) diff --git a/inventory_local.yaml b/inventory_local.yaml index 4cfd809..400cdde 100644 --- a/inventory_local.yaml +++ b/inventory_local.yaml @@ -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: