feat: configure systemd power management and fix kitty TERM

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
ja
2026-05-20 10:49:07 +02:00
co-authored by Junie
parent 6ff790fd4b
commit 45ad579120
3 changed files with 94 additions and 0 deletions
+43
View File
@@ -120,6 +120,49 @@
become: yes
tags: [systemd, optimization]
- name: Ensure systemd drop-in directories exist
file:
path: "{{ item }}"
state: directory
owner: root
group: root
mode: '0755'
with_items:
- /etc/systemd/logind.conf.d
- /etc/systemd/sleep.conf.d
become: yes
tags: [systemd, power]
- name: Configure systemd-logind to prevent sleep on keys/lid
copy:
dest: /etc/systemd/logind.conf.d/prevent-sleep.conf
content: |
[Login]
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
owner: root
group: root
mode: '0644'
become: yes
notify: Restart systemd-logind
tags: [systemd, power]
- name: Configure systemd-sleep to disable sleep/hibernation
copy:
dest: /etc/systemd/sleep.conf.d/prevent-sleep.conf
content: |
[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
owner: root
group: root
mode: '0644'
become: yes
tags: [systemd, power]
- name: Ensure systemd directories exist
file:
path: "{{ item }}"