Files
ansible/debian-sway.yml
Violet Truchseß 2ea3fad73c added wireguard submodule and snapper conf for boot
configured SSH key and wireguard

added libreofffice

removed prefixlength from wg_ips

updated wg-roadwarrior script

added ip forwarding to wireguard

moved inventory into private repo
2024-11-20 20:04:34 +01:00

169 lines
4.8 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
- snapper
- name: Enable networkmanager
service:
name: NetworkManager
enabled: yes
state: started
# - name: upgrade kernel
# apt:
# name: linux-image-amd64
# default_release: stable-backports
# state: latest
- 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: 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: setup snapper config for root filesystem
command:
cmd: snapper -c root create-config /
creates: /etc/snapper/configs/root
- name: setup snapper config for home filesystem
command:
cmd: snapper -c home create-config /home
creates: /etc/snapper/configs/home
- name: setup snapper config for boot filesystem
command:
cmd: snapper -c boot create-config /boot
creates: /etc/snapper/configs/boot
- name: disable timed root snapshots
lineinfile:
path: /etc/snapper/configs/root
regexp: "TIMELINE_CREATE"
line: 'TIMELINE_CREATE="no"'
notify: restart snapper
- name: disable timed boot snapshots
lineinfile:
path: /etc/snapper/configs/boot
regexp: "TIMELINE_CREATE"
line: 'TIMELINE_CREATE="no"'
notify: restart snapper
- name: set root snapshot max numbers
lineinfile:
path: /etc/snapper/configs/root
regexp: "NUMBER_LIMIT"
line: 'NUMBER_LIMIT="8"'
notify: restart snapper
- name: set boot snapshot max numbers
lineinfile:
path: /etc/snapper/configs/boot
regexp: "NUMBER_LIMIT"
line: 'NUMBER_LIMIT="8"'
notify: restart snapper
- name: set user permissions for home snapshots
lineinfile:
path: /etc/snapper/configs/home
regexp: "ALLOW_USERS"
line: 'ALLOW_USERS="vi"'
notify: restart snapper
- name: Set home snapshots timeline retention
lineinfile:
path: /etc/snapper/configs/home
regexp: "{{ item.param }}"
line: "{{ item.param }}=\"{{ item.value }}\""
notify: restart snapper
with_items:
- param: 'TIMELINE_LIMIT_HOURLY'
value: "8"
- param: 'TIMELINE_LIMIT_DAILY'
value: "5"
- param: 'TIMELINE_LIMIT_WEEKLY'
value: "2"
- param: 'TIMELINE_LIMIT_MONTHLY'
value: "1"
- param: 'TIMELINE_LIMIT_YEARLY'
value: "0"
handlers:
- name: update initramfs
command:
cmd: update-initramfs -u -k all
- name: update grub
command:
cmd: update-grub
- name: restart snapper
service:
name: snapperd
state: restarted