dotfiles/tasks/power-saving.yml

51 lines
1 KiB
YAML

- name: "Install power-saving stuff"
aur:
skip_installed: true
name: "{{ item }}"
become: true
become_user: aur_builder
when: "item not in installed_packages.stdout_lines"
with_items:
- 'acpi'
- ethtool
- nbfc
- 'powertop'
- 'psensor'
- smartmontools
- 'sysstat'
- tlp
- xfce4-power-manager
- name: Enable TLP services
systemd:
name: "{{ item }}"
enabled: true
with_items:
- tlp
- tlp-sleep
- 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