2023-11-22 22:55:38 +01:00
|
|
|
- name: Install packages for desktop environment
|
|
|
|
become: yes
|
|
|
|
apt:
|
|
|
|
state: latest
|
2023-11-26 21:33:09 +01:00
|
|
|
install_recommends: false
|
2023-11-22 22:55:38 +01:00
|
|
|
name:
|
|
|
|
- sway
|
|
|
|
- xwayland
|
|
|
|
- swaylock
|
|
|
|
- waybar
|
|
|
|
- xfce4-appfinder
|
|
|
|
- pipewire
|
|
|
|
- pipewire-pulse
|
2023-12-03 21:39:09 +01:00
|
|
|
- wireplumber
|
2023-11-22 22:55:38 +01:00
|
|
|
- alsa-utils
|
|
|
|
- brightnessctl
|
|
|
|
- flatpak
|
|
|
|
- adwaita-icon-theme
|
|
|
|
- fonts-firacode
|
|
|
|
- fonts-font-awesome
|
|
|
|
- fonts-noto-color-emoji
|
|
|
|
|
2023-11-22 23:01:13 +01:00
|
|
|
- name: Add flathub remote to flatpak
|
|
|
|
community.general.flatpak_remote:
|
|
|
|
name: flathub
|
|
|
|
state: present
|
|
|
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
|
|
method: user
|
|
|
|
|
2023-11-26 20:54:40 +01:00
|
|
|
- name: Install flatpaks
|
2023-11-22 22:55:38 +01:00
|
|
|
community.general.flatpak:
|
2023-11-26 20:54:40 +01:00
|
|
|
name: "{{ item }}"
|
2023-11-22 22:55:38 +01:00
|
|
|
state: present
|
2023-11-22 23:01:13 +01:00
|
|
|
method: user
|
2023-11-26 20:54:40 +01:00
|
|
|
loop:
|
|
|
|
- org.wezfurlong.wezterm
|
|
|
|
|
|
|
|
- name: Create group for sudoers config
|
|
|
|
become: yes
|
|
|
|
group:
|
|
|
|
name: admins
|
|
|
|
state: present
|
2023-11-22 22:55:38 +01:00
|
|
|
|
2023-11-26 20:54:40 +01:00
|
|
|
- name: Add user to group for sudoers config
|
|
|
|
become: yes
|
|
|
|
user:
|
|
|
|
append: true
|
|
|
|
name: "{{ ansible_user_id }}"
|
|
|
|
groups:
|
|
|
|
- admins
|
|
|
|
|
|
|
|
- name: Create sudoers config
|
|
|
|
become: yes
|
|
|
|
community.general.sudoers:
|
|
|
|
name: desktop-environment
|
|
|
|
group: admins
|
|
|
|
nopassword: true
|
|
|
|
commands:
|
|
|
|
- "/usr/bin/systemctl poweroff"
|
|
|
|
- "/usr/bin/systemctl reboot"
|
|
|
|
- "/usr/bin/systemctl suspend"
|
|
|
|
|
|
|
|
- name: Copy static config files
|
2023-11-22 23:01:13 +01:00
|
|
|
copy:
|
2023-11-26 20:54:40 +01:00
|
|
|
src: "{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
loop:
|
|
|
|
- src: "{{ role_path }}/files/.config"
|
|
|
|
dest: "{{ ansible_env.HOME }}/"
|
|
|
|
|
|
|
|
- name: Ensure presence of required directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
recurse: yes
|
|
|
|
state: directory
|
|
|
|
loop:
|
|
|
|
- "{{ ansible_env.HOME }}/.config/sway"
|
|
|
|
- "{{ ansible_env.HOME }}/.config/waybar"
|
|
|
|
|
|
|
|
- name: Render config files
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
loop:
|
|
|
|
- src: "bash_profile.j2"
|
|
|
|
dest: "{{ ansible_env.HOME }}/.bash_profile"
|
|
|
|
- src: "sway-config.j2"
|
|
|
|
dest: "{{ ansible_env.HOME }}/.config/sway/config"
|
|
|
|
- src: "waybar-config.j2"
|
|
|
|
dest: "{{ ansible_env.HOME }}/.config/waybar/config"
|