168 lines
4.6 KiB
YAML
168 lines
4.6 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
|
|
- 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: istall more packages
|
|
apt:
|
|
name:
|
|
- firefox-esr
|
|
- keepassxc
|
|
- flatpak
|
|
- vlc
|
|
- nautilus
|
|
- nautilus-share
|
|
- gnome-keyring
|
|
- seahorse
|
|
- eog
|
|
- evince
|
|
- pipewire-audio
|
|
- pipewire-pulse
|
|
- thunderbird
|
|
- yt-dlp
|
|
- pavucontrol
|
|
- borgbackup
|
|
state: present
|
|
- 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
|
|
- name: install flatpaks
|
|
flatpak:
|
|
name:
|
|
- im.riot.Riot
|
|
- org.signal.Signal
|
|
- com.synology.SynologyDrive
|
|
- com.github.tchx84.Flatseal
|
|
- name: install plymouth
|
|
apt:
|
|
name: plymouth
|
|
- name: get fox theme
|
|
git:
|
|
dest: /usr/share/plymouth/themes/foxy
|
|
repo: https://git.v-tr.org/violet/plymouth-foxy.git
|
|
notify: update initramfs
|
|
- name: Set plymouth theme
|
|
shell:
|
|
cmd: "plymouth-set-default-theme foxy && touch /etc/.plymouth"
|
|
creates: /etc/.plymouth
|
|
notify: update initramfs
|
|
- name: copy grub background
|
|
copy:
|
|
dest: /boot/grub/background.png
|
|
src: /usr/share/plymouth/themes/foxy/plymouth_background_foxy.png
|
|
- name: configure grub
|
|
lineinfile:
|
|
path: /etc/default/grub
|
|
line: "{{ item.line }}"
|
|
regexp: "{{ item.regexp }}"
|
|
with_items:
|
|
- line: GRUB_TIMEOUT=0
|
|
regexp: '^GRUB_TIMEOUT=.*'
|
|
- line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
|
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT=.*'
|
|
- line: GRUB_GFXMODE=1366x768
|
|
regexp: '#?GRUB_GFXMODE=.*'
|
|
- line: GRUB_BACKGROUND=/boot/grub/background.png
|
|
regexp: '^GRUB_BACKGROUND.*'
|
|
notify: update grub
|
|
- name: set grub colors
|
|
copy:
|
|
dest: /boot/grub/custom.cfg
|
|
content: set color_normal=dark-gray/black
|
|
|
|
handlers:
|
|
- name: update initramfs
|
|
command:
|
|
cmd: update-initramfs -u -k all
|
|
- name: update grub
|
|
command:
|
|
cmd: update-grub
|