1
0
Fork 0
dotfiles2000/system/arch/workstation.yaml

286 lines
6.4 KiB
YAML
Raw Permalink Normal View History

2024-10-31 22:09:39 +01:00
- name: "Configuration for all workstations"
hosts: localhost
connection: local
tasks:
2024-11-05 21:05:54 +01:00
- name: "Update pacman cache"
community.general.pacman:
update_cache: True
2024-10-31 22:09:39 +01:00
- name: "Install workstation packages"
2024-11-05 21:05:54 +01:00
ansible.builtin.package:
name: '{{ item }}'
2024-11-02 00:16:19 +01:00
state: present
2024-11-05 21:05:54 +01:00
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
2024-11-02 00:16:19 +01:00
- name: "Install X packages"
2024-11-05 21:05:54 +01:00
ansible.builtin.package:
name: '{{ item }}'
2024-10-31 22:09:39 +01:00
state: present
2024-11-05 21:05:54 +01:00
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
2024-10-31 22:09:39 +01:00
2024-11-02 21:08:55 +01:00
- name: "Install hypr packages"
2024-11-05 21:05:54 +01:00
ansible.builtin.package:
name: '{{ item }}'
2024-11-02 21:08:55 +01:00
state: present
2024-11-05 21:05:54 +01:00
update_cache: False
with_items:
- hyprland
- hyprlock
- hypridle
- hyprpicker
- hyprpaper
- cliphist
- wofi
- waybar
- kitty
- qt6-wayland
- xdg-desktop-portal-hyprland
2024-11-02 21:08:55 +01:00
2024-10-31 22:09:39 +01:00
- name: "Remove unwanted packages"
2024-11-05 21:05:54 +01:00
ansible.builtin.package:
2024-10-31 22:09:39 +01:00
name: '{{ item }}'
state: absent
2024-11-05 21:05:54 +01:00
update_cache: False
force: True
2024-10-31 22:09:39 +01:00
with_items:
2024-11-05 21:05:54 +01:00
- jack2
2024-10-31 22:09:39 +01:00
- xf86-input-synaptics
- name: "Install Audio System"
2024-11-05 21:05:54 +01:00
ansible.builtin.package:
2024-10-31 22:09:39 +01:00
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"
2024-11-05 21:05:54 +01:00
ansible.builtin.systemd:
2024-10-31 22:09:39 +01:00
name: ctrl-alt-del.target
masked: yes
- name: "Systemd: logind.conf"
2024-11-05 21:05:54 +01:00
ansible.builtin.copy:
2024-10-31 22:09:39 +01:00
dest: /etc/systemd/logind.conf
src: ./lib/etc/systemd/logind.conf
owner: root
group: root
mode: 0644
- name: "Lightdm: greeter config"
2024-11-05 21:05:54 +01:00
ansible.builtin.copy:
2024-10-31 22:09:39 +01:00
dest: /etc/lightdm/lightdm-gtk-greeter.conf
src: ./lib/etc/lightdm/lightdm-gtk-greeter.conf
owner: root
group: root
mode: 0644
- name: "Lightdm: config"
2024-11-05 21:05:54 +01:00
ansible.builtin.copy:
2024-10-31 22:09:39 +01:00
dest: /etc/lightdm/lightdm.conf
src: ./lib/etc/lightdm/lightdm.conf
owner: root
group: root
mode: 0644
- name: "Pam: Login"
2024-11-05 21:05:54 +01:00
ansible.builtin.copy:
2024-10-31 22:09:39 +01:00
dest: /etc/pam.d/login
src: ./lib/etc/pam.d/login
owner: root
group: root
mode: 0644
- name: "Pam: Passwd"
2024-11-05 21:05:54 +01:00
ansible.builtin.copy:
2024-10-31 22:09:39 +01:00
dest: /etc/pam.d/passwd
src: ./lib/etc/pam.d/passwd
owner: root
group: root
mode: 0644
- name: "Service: No netctl"
2024-11-05 21:05:54 +01:00
ansible.builtin.service:
2024-10-31 22:09:39 +01:00
name: netctl.service
state: stopped
enabled: no
- name: "Service: NetworkManager"
2024-11-05 21:05:54 +01:00
ansible.builtin.service:
2024-10-31 22:09:39 +01:00
name: NetworkManager.service
state: started
enabled: yes
- name: "Service: lightdm"
2024-11-05 21:05:54 +01:00
ansible.builtin.service:
2024-10-31 22:09:39 +01:00
name: lightdm.service
state: started
enabled: yes
## X11
- name: "X11: Keyboard"
when: "'gpd' not in ansible_hostname"
2024-11-05 21:05:54 +01:00
ansible.builtin.copy:
2024-10-31 22:09:39 +01:00
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"
2024-11-05 21:05:54 +01:00
ansible.builtin.copy:
2024-10-31 22:09:39 +01:00
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"
2024-11-05 21:05:54 +01:00
ansible.builtin.package:
2024-10-31 22:09:39 +01:00
name: '{{ item }}'
state: present
update_cache: True
with_items:
- tlp
- name: "TLP: config"
when: ansible_facts['form_factor'] == "Notebook"
2024-11-05 21:05:54 +01:00
ansible.builtin.copy:
2024-10-31 22:09:39 +01:00
dest: /etc/default/tlp
src: ./lib/etc/default/tlp
owner: root
group: root
mode: 0644
- name: "TLP: Service"
when: ansible_facts['form_factor'] == "Notebook"
2024-11-05 21:05:54 +01:00
ansible.builtin.service:
2024-10-31 22:09:39 +01:00
name: tlp
state: started
enabled: yes
- name: "Set Xbacklight permissions by udev"
2024-11-05 21:05:54 +01:00
ansible.builtin.copy:
2024-10-31 22:09:39 +01:00
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"