dotfiles/tasks/power-saving.yml

48 lines
986 B
YAML

- name: Install power-saving stuff
aur:
name: "{{ item }}"
become: true
become_user: aur_builder
when: item not in installed_packages.stdout_lines
loop:
- acpi
- ethtool
- nbfc
- powertop
- psensor
- smartmontools
- sysstat
- tlp
- xfce4-power-manager
- name: Enable TLP services
systemd:
name: tlp
enabled: true
state: started
- name: Enable NBFC
systemd:
name: nbfc
enabled: true
state: started
- name: Install TLP config
copy:
src: ./files/tlp.conf
dest: /etc/default/tlp
mode: 0644
- name: Create XFCE4 power manager config directory
file:
path: "{{ home }}/.config/xfce4/xfconf/xfce-perchannel-xml"
state: directory
owner: "{{ user }}"
mode: 0755
- name: Install XFCE4 power manager config
copy:
src: ./files/xfce4-power-manager.xml
dest: "{{ home }}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml"
owner: "{{ user }}"
mode: 0644