Update laptop configuration

This commit is contained in:
Sonny Bakker 2024-06-05 18:45:59 +02:00
parent 25ca753bb9
commit 556acd2480
6 changed files with 15 additions and 37 deletions

View file

@ -51,11 +51,11 @@
state: started
enabled: true
- name: start iwd service
- name: restart iwd
become: true
systemd:
name: iwd
state: started
state: restarted
enabled: true
when: platform == "laptop"

View file

@ -33,17 +33,6 @@
state: touch
mode: '0644'
- name: copy powertop service
become: true
template:
src: 'templates/{{ platform }}/powertop.j2'
dest: '/etc/systemd/system/powertop.service'
owner: root
group: root
mode: '0644'
notify: restart powertop
when: platform == "laptop"
- name: create alacritty configuration dir
file:
path: '{{ xdg_config_dir }}/alacritty'
@ -60,21 +49,20 @@
name: fstrim.timer
enabled: true
# TODO: setup discrete GPU and remove this configuration
- name: disable nvidia GPU
# TODO: set fan settings to `quiet` with smbios-thermal-ctl
- name: remove old configuration files
block:
- name: create udev rule
become: true
template:
src: 'templates/{{ platform }}/udev.j2'
dest: '/etc/udev/rules.d/00-remove-nvidia.rules'
owner: root
group: root
file:
path: '/etc/udev/rules.d/00-remove-nvidia.rules'
state: absent
- name: blacklist kernel module
become: true
template:
src: 'templates/{{ platform }}/nouveau-blacklist.j2'
dest: '/etc/modprobe.d/blacklist-nouveau.conf'
file:
path: '/etc/modprobe.d/blacklist-nouveau.conf'
state: absent
owner: root
group: root
when: platform == "laptop"

View file

@ -1,2 +0,0 @@
blacklist nouveau
options nouveau modeset=0

View file

@ -1,9 +0,0 @@
[Unit]
Description=Powertop tunings
[Service]
ExecStart=/usr/bin/powertop --auto-tune
RemainAfterExit=true
[Install]
WantedBy=multi-user.target

View file

@ -1,2 +0,0 @@
# Remove NVIDIA VGA/3D controller devices
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"

View file

@ -1,6 +1,9 @@
platform_packages:
- iwd
- powertop
- nvidia
- nvidia-prime
- nvidia-utils
- lib32-nvidia-utils
vpn_ip: '10.0.0.2'
vpn_subnet: '24'