Add laptop power saving conf
This commit is contained in:
parent
d1154ef254
commit
a101d6c0e3
4 changed files with 30 additions and 3 deletions
|
|
@ -43,3 +43,11 @@
|
||||||
state: restarted
|
state: restarted
|
||||||
enabled: true
|
enabled: true
|
||||||
scope: user
|
scope: user
|
||||||
|
|
||||||
|
- name: restart powertop
|
||||||
|
become: yes
|
||||||
|
systemd:
|
||||||
|
name: powertop
|
||||||
|
state: restarted
|
||||||
|
enabled: true
|
||||||
|
daemon-reload: true
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,16 @@
|
||||||
state: touch
|
state: touch
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|
||||||
# TODO
|
- name: copy powertop service
|
||||||
# - laptop power saving configuration
|
become: yes
|
||||||
# - laptop pacman specific configuration
|
template:
|
||||||
|
src: "{{ platform }}/powertop.j2"
|
||||||
|
dest: "/etc/systemd/system/powertop.service"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
notify: restart powertop
|
||||||
|
when: platform == "laptop"
|
||||||
|
|
||||||
- include_tasks: systemd.yml
|
- include_tasks: systemd.yml
|
||||||
- include_tasks: gpg.yml # TODO
|
- include_tasks: gpg.yml # TODO
|
||||||
|
|
|
||||||
11
roles/arch/templates/laptop/powertop.j2
Normal file
11
roles/arch/templates/laptop/powertop.j2
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Powertop tunings
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/powertop --auto-tune
|
||||||
|
RemainAfterExit=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
platform_packages:
|
platform_packages:
|
||||||
- iwd
|
- iwd
|
||||||
|
- powertop
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue