Add desktop sysctl/modprobe config files

This commit is contained in:
Sonny Bakker 2024-09-04 09:18:01 +02:00
parent 6e88c23a9d
commit a5ed57f910
5 changed files with 65 additions and 1 deletions

View file

@ -85,3 +85,7 @@
enabled: true enabled: true
scope: user scope: user
daemon-reload: true daemon-reload: true
- name: reload sysctl configuration
become: true
command: 'sysctl --system'

View file

@ -66,6 +66,57 @@
name: fstrim.timer name: fstrim.timer
enabled: true enabled: true
- block:
- name: remove the sysctl.d directory
become: true
file:
path: /etc/sysctl.d
state: absent
- name: recreate the sysctl.d directory
become: true
file:
path: /etc/sysctl.d
state: directory
mode: 755
- name: copy sysctl files
become: true
template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
loop:
- {
src: 'templates/desktop/sysctl/99-sysrq.conf.j2',
dest: '/etc/sysctl.d/99-sysrq.conf'
}
- {
src: 'templates/desktop/sysctl/98-forward.conf.j2',
dest: '/etc/sysctl.d/98-foward.conf'
}
notify: reload sysctl configuration
- name: remove the modprobe.d directory
become: true
file:
path: /etc/modprobe.d
state: absent
- name: recreate the modprobe.d directory
become: true
file:
path: /etc/modprobe.d
state: directory
mode: 755
- name: copy modprobe files
become: true
template:
src: '{{ item.src }}'
dest: '{{ item.dest }}'
loop:
- {
src: 'templates/desktop/modprobe/99-amdgpu.conf.j2',
dest: '/etc/modprobe.d/99-amdgpu.conf'
}
when: platform == 'desktop'
# TODO: set fan settings to `quiet` with smbios-thermal-ctl # TODO: set fan settings to `quiet` with smbios-thermal-ctl
- name: remove old configuration files - name: remove old configuration files
@ -82,4 +133,4 @@
state: absent state: absent
owner: root owner: root
group: root group: root
when: platform == "laptop" when: platform == 'laptop'

View file

@ -0,0 +1,5 @@
# {{ ansible_managed }}
# disable Panel Self Refresh for 6.10
# see https://bbs.archlinux.org/viewtopic.php?pid=2191514#p2191514
options amdgpu dcdebugmask=0x12

View file

@ -0,0 +1,2 @@
# {{ ansible_managed }}
net.ipv4.ip_forward = 1

View file

@ -0,0 +1,2 @@
# {{ ansible_managed }}
kernel.sysrq = 1