diff --git a/roles/fedora_setup/tasks/main.yml b/roles/fedora_setup/tasks/main.yml index f36d5f3..4c8b18e 100755 --- a/roles/fedora_setup/tasks/main.yml +++ b/roles/fedora_setup/tasks/main.yml @@ -284,12 +284,6 @@ WantedBy=default.target tags: battery -- name: Reload systemd user daemon - command: systemctl --user daemon-reexec - environment: - XDG_RUNTIME_DIR: "/run/user/{{ ansible_uid }}" - tags: battery - - name: Reload systemd user units command: systemctl --user daemon-reload environment: @@ -305,3 +299,40 @@ environment: XDG_RUNTIME_DIR: "/run/user/{{ ansible_uid }}" tags: battery + +# Dunst +- name: Install dunst systemd user service + copy: + dest: "{{ lookup('env', 'HOME') }}/.config/systemd/user/dunst.service" + mode: '0644' + content: | + [Unit] + Description=Dunst notification daemon + After=graphical-session.target + + [Service] + ExecStart=/usr/bin/dunst + Restart=always + RestartSec=2 + + [Install] + WantedBy=default.target + tags: dunst + +- name: Reload systemd user daemon + systemd: + daemon_reload: true + scope: user + environment: + XDG_RUNTIME_DIR: "/run/user/{{ ansible_uid }}" + tags: dunst + +- name: Enable and start dunst systemd user service + systemd: + name: dunst.service + scope: user + enabled: true + state: started + environment: + XDG_RUNTIME_DIR: "/run/user/{{ ansible_uid }}" + tags: dunst