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
|
||||
enabled: true
|
||||
scope: user
|
||||
|
||||
- name: restart powertop
|
||||
become: yes
|
||||
systemd:
|
||||
name: powertop
|
||||
state: restarted
|
||||
enabled: true
|
||||
daemon-reload: true
|
||||
|
|
|
|||
|
|
@ -42,9 +42,16 @@
|
|||
state: touch
|
||||
mode: "0644"
|
||||
|
||||
# TODO
|
||||
# - laptop power saving configuration
|
||||
# - laptop pacman specific configuration
|
||||
- name: copy powertop service
|
||||
become: yes
|
||||
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: 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:
|
||||
- iwd
|
||||
- powertop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue