mpd + rpm fusion

This commit is contained in:
2025-04-29 21:56:23 -07:00
parent 102c1dc9c6
commit 51035a4336
3 changed files with 84 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
- name: Reload systemd user daemon
command: systemctl --user daemon-reexec

View File

@@ -55,6 +55,45 @@
tags:
- packages
## RPM Fusion
- name: Install RPM Fusion Free Repository
package:
name: "https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ ansible_distribution_major_version }}.noarch.rpm"
state: present
- name: Install RPM Fusion Nonfree Repository
package:
name: "https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ ansible_distribution_major_version }}.noarch.rpm"
state: present
- name: Install Multimedia Group Packages
package:
name: "@multimedia"
state: present
- name: Install Sound and Video Group Packages
package:
name: "@sound-and-video"
state: present
- name: Install Additional Multimedia Codecs
package:
name:
- gstreamer1-plugins-bad-free
- gstreamer1-plugins-good
- gstreamer1-plugins-ugly
- gstreamer1-plugins-base
- gstreamer1-plugin-openh264
- gstreamer1-libav
- lame
state: present
- name: Swap ffmpeg-free with full ffmpeg
command: dnf5 swap ffmpeg-free ffmpeg --allowerasing
args:
warn: false
# Base System Setup
- name: Create groups
group:
@@ -166,3 +205,44 @@
mode: '0644'
directory_mode: '0700'
tags: gpg
- name: Create MPD directories
file:
path: "{{ item }}"
state: directory
mode: '0755'
loop:
- "{{ ansible_user_dir }}/.config/mpd"
- "{{ ansible_user_dir }}/.config/mpd/playlists"
- "{{ ansible_user_dir }}/.local/share/mpd"
- "{{ ansible_user_dir }}/.local/share/mpd/music"
- name: Create MPD log, db, pid, state, and socket files
file:
path: "{{ ansible_user_dir }}/.local/share/mpd/{{ item }}"
state: touch
mode: '0644'
loop:
- db
- log
- pid
- state
- sticker.sql
- name: Systemd override to use custom mpd.conf
copy:
dest: "{{ ansible_user_dir }}/.config/systemd/user/mpd.service.d/override.conf"
content: |
[Service]
ExecStart=
ExecStart=/usr/bin/mpd --no-daemon {{ ansible_user_dir }}/.config/mpd/mpd.conf
notify: Reload systemd user daemon
- name: Enable and start user mpd service
systemd:
scope: user
enabled: true
name: mpd
state: started
daemon_reload: true

View File

@@ -1,6 +1,6 @@
---
copr_repos:
- swayfx/swayfx
- axeld/eww
packages:
- sway
@@ -52,6 +52,7 @@ packages:
- dnf-automatic
- translate-shell
- newsboat
- mpd
- ncmpcpp
- asunder
- qutebrowser