119 lines
3.1 KiB
YAML
119 lines
3.1 KiB
YAML
- name: Setup basic desktop environment
|
|
hosts: localhost
|
|
become_method: sudo
|
|
become: yes
|
|
tasks:
|
|
- name: install basic packages
|
|
apt:
|
|
name:
|
|
- sway
|
|
- swaylock
|
|
- waybar
|
|
- wofi
|
|
- alacritty
|
|
- git
|
|
- stow
|
|
- curl
|
|
- firefox-esr
|
|
- fish
|
|
- ripgrep
|
|
- exa
|
|
- bat
|
|
- xwayland
|
|
- swayidle
|
|
- fonts-ubuntu
|
|
- fonts-font-awesome
|
|
- lightdm
|
|
- xwayland
|
|
- wl-clipboard
|
|
- neovim
|
|
- shellcheck
|
|
- git-annex
|
|
- flatpak
|
|
- network-manager
|
|
- pipewire-audio
|
|
- pipewire-pulse
|
|
- thunderbird
|
|
- name: Enable networkmanager
|
|
service:
|
|
name: NetworkManager
|
|
enabled: yes
|
|
state: started
|
|
- name: upgrade kernel
|
|
apt:
|
|
name: linux-image-amd64
|
|
default_release: stable-backports
|
|
- name: remove gnome xdg portal
|
|
apt:
|
|
name:
|
|
- xdg-desktop-portal-gnome
|
|
- xdg-desktop-portal-gtk
|
|
- xdg-desktop-portal
|
|
state: absent
|
|
- name: Get dotfiles
|
|
git:
|
|
dest: ~/dotfiles
|
|
repo: https://git.v-tr.org/violet/dotfiles
|
|
update: false
|
|
become: no
|
|
- name: setup dotfiles
|
|
command:
|
|
cmd: stow {{ item.name }}
|
|
chdir: ~/dotfiles
|
|
creates: "{{ item.path }}"
|
|
with_items:
|
|
- { name: alacritty, path: ~/.config/alacritty }
|
|
- { name: fish, path: ~/.config/fish }
|
|
- { name: git, path: ~/.config/git }
|
|
- { name: nvim, path: ~/.config/nvim }
|
|
- { name: sway, path: ~/.config/sway }
|
|
- { name: wofi, path: ~/.config/wofi }
|
|
- { name: borg, path: ~/.borg }
|
|
- { name: gtk, path: ~/.config/gtk-3.0 }
|
|
- { name: waybar, path: ~/.config/waybar }
|
|
become: no
|
|
- name: set default shell
|
|
user:
|
|
name: vi
|
|
shell: /usr/bin/fish
|
|
- name: Set power button behavior
|
|
lineinfile:
|
|
line: "HandlePowerKey=hibernate"
|
|
path: "/etc/systemd/logind.conf"
|
|
regexp: '.*HandlePowerKey.*'
|
|
- name: set lidswitch behavior
|
|
lineinfile:
|
|
line: "HandleLidSwitch=suspend-then-hibernate"
|
|
path: "/etc/systemd/logind.conf"
|
|
regexp: '.*HandleLidSwitch.*'
|
|
- name: set hibernation delay
|
|
lineinfile:
|
|
line: "HibernateDelaySec=2h"
|
|
path: "/etc/systemd/sleep.conf"
|
|
regexp: '.*HibernateDelaySec.*'
|
|
- name: enable wireplumber
|
|
systemd_service:
|
|
name: wireplumber.service
|
|
enabled: yes
|
|
state: started
|
|
scope: user
|
|
become: no
|
|
- name: setup autologin
|
|
lineinfile:
|
|
path: /etc/lightdm/lightdm.conf
|
|
line: autologin-user=vi
|
|
regexp: '.*autologin-user.*'
|
|
insertafter: '^\[Seat:\*\]$'
|
|
- name: setup flathub
|
|
flatpak_remote:
|
|
name: flathub
|
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
|
|
handlers:
|
|
- name: update initramfs
|
|
command:
|
|
cmd: update-initramfs -u -k all
|
|
- name: update grub
|
|
command:
|
|
cmd: update-grub
|