Setup desktop initramfs configuration

This commit is contained in:
Sonny Bakker 2024-09-04 10:54:50 +02:00
parent a5ed57f910
commit 5d91c4196d
7 changed files with 154 additions and 69 deletions

View file

@ -65,72 +65,3 @@
systemd:
name: fstrim.timer
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
- name: remove old configuration files
block:
- name: create udev rule
become: true
file:
path: '/etc/udev/rules.d/00-remove-nvidia.rules'
state: absent
- name: blacklist kernel module
become: true
file:
path: '/etc/modprobe.d/blacklist-nouveau.conf'
state: absent
owner: root
group: root
when: platform == 'laptop'