fix: add restart timer to some services

This commit is contained in:
Matthieu Bessat 2024-07-08 11:07:46 +02:00
parent 93c9f6cfbb
commit df1082920e
6 changed files with 22 additions and 10 deletions

View file

@ -178,3 +178,4 @@ https://archinstall.archlinux.page/
## Pistes
https://github.com/kewlfft/ansible-aur

View file

@ -6,6 +6,6 @@ Description=xremap
[Service]
Restart=always
ExecStart=xremap {{ home }}/.config/xremap/config.yaml
ExecStart=xremap --watch=device {{ home }}/.config/xremap/config.yaml
# --watch does nothing

View file

@ -5,6 +5,8 @@ PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=wl-paste --watch cliphist store
Restart=always
RestartSec=3
[Install]
WantedBy=sway-session.target

View file

@ -5,6 +5,8 @@ PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=gammastep -l 49.1:1.33 -t 5000K:2500K
Restart=always
RestartSec=3
[Install]
WantedBy=sway-session.target

View file

@ -5,6 +5,8 @@ PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=swaybg -i {{ home }}/.dots/wallpapers/jupiter.jpg -m fill
Restart=always
RestartSec=10
[Install]
WantedBy=sway-session.target

View file

@ -253,7 +253,7 @@
- name: Setup user unit with from
loop: "{{ systemd_services.user }}"
when: "item.from is defined"
when: "item.from is defined and (item.profile == 'all' or item.profile == profile)"
template:
src: "systemd/user/{{ item.from }}.service"
dest: "{{ home }}/.config/systemd/user/{{ item.name }}.service"
@ -262,7 +262,7 @@
- name: Setup user timers
loop: "{{ systemd_services.user }}"
when: "item.timer is defined and item.timer"
when: "item.timer is defined and item.timer and (item.profile == 'all' or item.profile == profile)"
template:
src: "systemd/user/{{ item.name }}.timer"
dest: "{{ home }}/.config/systemd/user/{{ item.name }}.timer"
@ -278,7 +278,7 @@
enabled: true
- name: Enable some systemd user timers
when: "item.timer is defined and item.timer"
when: "item.timer is defined and item.timer and (item.profile == 'all' or item.profile == profile)"
loop: "{{ systemd_services.user }}"
systemd_service:
scope: user
@ -367,12 +367,6 @@
dest: "/usr/bin/rofi"
state: link
# Final workspaces
- name: Clone monakhos
ansible.builtin.git:
repo: "git@forge.lefuturiste.fr:mbess/monakhos.git"
dest: /home/mbess/workspace/monakhos
- name: Setup OpenFortiVPN
when: 'profile == "pro"'
include_role:
@ -391,3 +385,14 @@
state: link
force: true
- name: Set default browser
include_role:
name: xdg_browser
vars:
default_browser: librewolf
# Final workspaces
- name: Clone monakhos
ansible.builtin.git:
repo: "git@forge.lefuturiste.fr:mbess/monakhos.git"
dest: /home/mbess/workspace/monakhos