- name: "Configuration for all workstations" hosts: localhost connection: local tasks: - name: "Update pacman cache" community.general.pacman: update_cache: True - name: "Install workstation packages" ansible.builtin.package: name: '{{ item }}' state: present update_cache: False with_items: - acpi - bash - bash-completion - binutils - blueman - bluez-utils - brightnessctl - coreutils - cryptsetup - curl - device-mapper - dialog - diffutils - dos2unix - dosfstools - e2fsprogs - file - filesystem - findutils - firefox - firefox-i18n-de - gnu-netcat - grep - gzip - imagemagick - inetutils - less - licenses - lightdm - lightdm-gtk-greeter - lightdm-gtk-greeter-settings - linux - linux-headers - lm_sensors - lshw - lvm2 - man-db - man-pages - mc - mplayer - nano - network-manager-applet - networkmanager - nmap - nmon - pcmanfm-gtk3 - perl - perl-date-manip - powerline-fonts - qrencode - screenfetch - sed - strace - texinfo - texlive-bibtexextra - texlive-core - texlive-fontsextra - texlive-formatsextra - texlive-games - texlive-humanities - texlive-latexextra - texlive-music - texlive-pictures - texlive-pstricks - texlive-publishers - texlive-science - tree - ttf-3270-nerd - ttf-cousine-nerd - ttf-envycoder-nerd - ttf-font-awesome - ttf-hack-nerd - ttf-inconsolata-nerd - unzip - usbutils - w3m - wget - wpa_supplicant - xdot - zathura - zathura-pdf-mupdf - name: "Install X packages" ansible.builtin.package: name: '{{ item }}' state: present update_cache: False with_items: - alacritty - arandr - autorandr - clipmenu - dmenu - dunst - feh - i3-wm - i3lock - i3status-rust - rofi - scrot - xautolock - xclip - xdot - xf86-input-libinput - xorg-apps - xorg-xclipboard - xorg-server - name: "Install hypr packages" ansible.builtin.package: name: '{{ item }}' state: present update_cache: False with_items: - hyprland - hyprlock - hypridle - hyprpicker - hyprpaper - cliphist - wofi - waybar - kitty - qt6-wayland - xdg-desktop-portal-hyprland - name: "Remove unwanted packages" ansible.builtin.package: name: '{{ item }}' state: absent update_cache: False force: True with_items: - jack2 - xf86-input-synaptics - name: "Install Audio System" ansible.builtin.package: name: '{{ item }}' state: present update_cache: False with_items: - alsa-utils - libpulse - pipewire - pipewire-audio - pipewire-alsa - pipewire-jack - pipewire-pulse - qpwgraph - pavucontrol # Replace with pwvucontrol - wireplumber - name: "Systemd: Disable reboot on ctrl+alt+del" ansible.builtin.systemd: name: ctrl-alt-del.target masked: yes - name: "Systemd: logind.conf" ansible.builtin.copy: dest: /etc/systemd/logind.conf src: ./lib/etc/systemd/logind.conf owner: root group: root mode: 0644 - name: "Lightdm: greeter config" ansible.builtin.copy: dest: /etc/lightdm/lightdm-gtk-greeter.conf src: ./lib/etc/lightdm/lightdm-gtk-greeter.conf owner: root group: root mode: 0644 - name: "Lightdm: config" ansible.builtin.copy: dest: /etc/lightdm/lightdm.conf src: ./lib/etc/lightdm/lightdm.conf owner: root group: root mode: 0644 - name: "Pam: Login" ansible.builtin.copy: dest: /etc/pam.d/login src: ./lib/etc/pam.d/login owner: root group: root mode: 0644 - name: "Pam: Passwd" ansible.builtin.copy: dest: /etc/pam.d/passwd src: ./lib/etc/pam.d/passwd owner: root group: root mode: 0644 - name: "Service: No netctl" ansible.builtin.service: name: netctl.service state: stopped enabled: no - name: "Service: NetworkManager" ansible.builtin.service: name: NetworkManager.service state: started enabled: yes - name: "Service: lightdm" ansible.builtin.service: name: lightdm.service state: started enabled: yes ## X11 - name: "X11: Keyboard" when: "'gpd' not in ansible_hostname" ansible.builtin.copy: dest: /etc/X11/xorg.conf.d/00-keyboard.conf src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf owner: root group: root mode: 0644 - name: "X11: Touchpad" when: "'gpd' not in ansible_hostname" ansible.builtin.copy: dest: /etc/X11/xorg.conf.d/50-touchpad.conf src: ./lib/etc/X11/xorg.conf.d/50-touchpad.conf owner: root group: root mode: 0644 ## Notbook Specials - name: "Install Notebook packages" when: ansible_facts['form_factor'] == "Notebook" ansible.builtin.package: name: '{{ item }}' state: present update_cache: True with_items: - tlp - name: "TLP: config" when: ansible_facts['form_factor'] == "Notebook" ansible.builtin.copy: dest: /etc/default/tlp src: ./lib/etc/default/tlp owner: root group: root mode: 0644 - name: "TLP: Service" when: ansible_facts['form_factor'] == "Notebook" ansible.builtin.service: name: tlp state: started enabled: yes - name: "Set Xbacklight permissions by udev" ansible.builtin.copy: dest: /etc/udev/rules.d/90-backlight.rules owner: root group: root mode: 0644 content: | SUBSYSTEM=="backlight", ACTION=="add", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"