--- - name: Basic Setup hosts: ch-equinox-t450s roles: - role: apt-repo/base - role: core/base - role: core/sshd/base - role: core/zsh - role: core/cpu-microcode post_tasks: - name: get list of foreign architectures from dpkg command: dpkg --print-foreign-architectures changed_when: false register: dpkg_foreign_architectures check_mode: no - name: add i386 to dpkg foreign architectures when: "'i386' not in dpkg_foreign_architectures.stdout_lines" command: dpkg --add-architecture i386 - name: Payload Setup hosts: ch-equinox-t450s roles: - role: apt-repo/backports - role: apt-repo/spreadspace - role: apt-repo/ansible - role: apt-repo/tor-project - role: apt-repo/kubernetes - role: apt-repo/element - role: apt-repo/kicad6 - role: storage/zfs/base - role: storage/zfs/sanoid - role: ws/base - role: core/users - role: network/wireguard/base - role: ws/minet - role: ws/pipewire - role: ws/flatpak post_tasks: - name: make sure tlp is started and enabled systemd: name: tlp.service state: started enabled: yes - name: disable caps-lock lineinfile: path: /etc/default/keyboard regexp: '#?\s*XKBOPTIONS=' line: 'XKBOPTIONS="caps:none"' ## TODO install autostart and keyboard shortcut Ctrl+P - name: install touchpad control script copy: dest: /usr/local/bin/touchpadctl mode: 0755 content: | #!/bin/bash ID=$(xinput list | grep "SynPS/2 Synaptics TouchPad" | sed 's/^.*id=\([0-9]*\).*$/\1/') if [ -z "$ID" ]; then ID=$(xinput list | grep "Synaptics TM3053-004" | sed 's/^.*id=\([0-9]*\).*$/\1/') fi if [ -z "$ID" ]; then echo "cannot find device!" exit 1 fi if [ -n "ID" ]; then case $1 in enable|disable) xinput $1 $ID ;; toggle) CURRENT_STATE=$(xinput list-props $ID | grep 'Device Enabled' | awk 'BEGIN { FS = ":" } ; { print $2 }' | sed 's/^.*\([01]\).*$/\1/') if [ $CURRENT_STATE -ne 1 ]; then xinput enable $ID else xinput disable $ID fi ;; *) echo "usage: $0 (enable|disable|toggle)" ;; esac else echo "Touchpad not found..." fi - name: install deps for c3voc/cm repo pip: name: - "bundlewrap>=4.13.6" - "bundlewrap-keepass"