diff --git a/handlers.yml b/handlers.yml index ab48d05..38cfd5a 100644 --- a/handlers.yml +++ b/handlers.yml @@ -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" diff --git a/tasks/setup.yml b/tasks/setup.yml index f213248..9a2b399 100644 --- a/tasks/setup.yml +++ b/tasks/setup.yml @@ -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" diff --git a/templates/laptop/nouveau-blacklist.j2 b/templates/laptop/nouveau-blacklist.j2 deleted file mode 100644 index c9b9bfc..0000000 --- a/templates/laptop/nouveau-blacklist.j2 +++ /dev/null @@ -1,2 +0,0 @@ -blacklist nouveau -options nouveau modeset=0 diff --git a/templates/laptop/powertop.j2 b/templates/laptop/powertop.j2 deleted file mode 100644 index d30f4ce..0000000 --- a/templates/laptop/powertop.j2 +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Powertop tunings - -[Service] -ExecStart=/usr/bin/powertop --auto-tune -RemainAfterExit=true - -[Install] -WantedBy=multi-user.target diff --git a/templates/laptop/udev.j2 b/templates/laptop/udev.j2 deleted file mode 100644 index e9a40ab..0000000 --- a/templates/laptop/udev.j2 +++ /dev/null @@ -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" diff --git a/vars/laptop.yml b/vars/laptop.yml index 3bf6e7d..fa0e5b9 100644 --- a/vars/laptop.yml +++ b/vars/laptop.yml @@ -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'