dots/play.yml
2024-04-13 21:25:32 +03:00

192 lines
4.7 KiB
YAML

#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠀⠀⠀⡠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⣀⣠⡤⣀⣀⡀⠀⠀⠀⠑⡀⠈⠂⡠⣠⠊⠀⢀⠜⠀⠀⠀⠀⣀⣀⠀⠀⠀⠀⠀
#⠈⢿⣭⡍⠩⠉⠄⢛⡲⠤⣀⠸⣄⣿⣿⣿⣷⣴⣡⠤⣒⠩⠝⢩⡙⠫⠝⠛⣶
#⠀⠀⠉⢖⠒⠒⠒⠀⠐⠚⠷⣺⣇⠀⠀⠀⠋⣿⠿⣗⣀⡉⠉⠩⣭⣤⣽⠿⠋⠀
#⠀⠀⠀⠈⠓⠠⠤⠬⠷⠖⢋⡽⣿⣷⢄⣸⣼⣿⣍⠓⠥⢍⣶⣤⡍⠔⠂⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⡴⢩⣾⣿⣛⢟⠿⢿⣷⡌⠱⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠂⠉⠰⡟⣯⣍⠙⠛⠛⢛⣿⣗⡄⠈⠀⠃⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠿⠁⣯⣙⠛⠿⠟⢻⣿⠛⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠘⢿⡻⠿⠾⣻⠏⠀⡅⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠜⠀⠀⠀⠉⠙⠋⠁⠀⠀⠘⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
# This file should be distributed elsewhere.
# Once you're in your arch system (with networking!), `wget` this file and run
# ansible-galaxy collection install community.general
# ansible-galaxy collection install kewlfft.aur
# ansible-playbook -K play.yml
- name: Install My System (holy shit!)
hosts: localhost
tasks:
- name: Gather the package facts
ansible.builtin.package_facts:
manager: auto
- name: Create user group
ansible.builtin.group:
name: yf
state: present
become: yes
- name: Create user
ansible.builtin.user:
name: yf
create_home: yes
groups: yf
append: yes
state: present
become: yes
- name: Install sudo
community.general.pacman:
name:
- sudo
state: present
become: yes
- name: Give user yf max sudoers
community.general.sudoers:
name: main-user
state: present
user: yf
runas: ALL
commands: ALL
become: yes
- name: Install yay prerequisites
community.general.pacman:
name:
- make
- gcc
- fakeroot
state: present
become: yes
- name: Install yay using makepkg if it isn't installed already
kewlfft.aur.aur:
name: yay
use: makepkg
state: present
become: yes
become_user: yf
- name: Install stow
community.general.pacman:
name:
- stow
state: present
become: yes
- name: Clone my dotfiles
ansible.builtin.git:
repo: 'https://github.com/fucksophie/dots.git'
dest: /home/yf/.shell
become: yes
become_user: yf
- name: Upgrade the system using yay
kewlfft.aur.aur:
upgrade: yes
use: yay
become: yes
become_user: yf
- name: Run stow
ansible.builtin.shell: "stow . --target=/home/yf/ --verbose=2"
args:
chdir: /home/yf/.shell/src
register: result
changed_when: 'result.stderr is search("LINK: ")'
become: yes
become_user: yf
- name: Install everything
kewlfft.aur.aur:
use: yay
name: "{{ item }}"
state: present
extra_args: "--needed"
loop:
- sdbus-cpp
- python-gpgme
- pkgconfig
- patch
- flex
- bison
- which
- pipewire
- wireplumber
- pipewire-pulse
- pipewire-alsa
- pipewire-jack
- qpwgraph
- hyprland
- xdg-desktop-portal-hyprland-git
- polkit-kde-agent
- waybar
- foot
- nushell
- wl-clipboard
- slurp
- grim
- rofi-lbonn-wayland-git
- mako
- swww
- thunar
- gvfs
- gvfs-smb
- spotify
- spicetify-cli
- ttf-jetbrains-mono-nerd
- vencord-desktop-git
- vivaldi
- wps-office
- ttf-wps-fonts
- visual-studio-code-bin
- pipes.sh
- neofetch
- network-manager-applet
- lemurs
- syncthing
become: yes
become_user: yf
- name: Create .bash_profile
ansible.builtin.file:
path: /home/yf/.bash_profile
state: touch
modification_time: preserve
access_time: preserve
become: yes
become_user: yf
- name: Enable lemurs
ansible.builtin.systemd:
name: lemurs
enabled: true
become: yes
- name: Create lemurs wayland dir
ansible.builtin.file:
path: /etc/lemurs/wayland/
state: directory
become: yes
- name: Create auto hyprland login
ansible.builtin.file:
path: /etc/lemurs/wayland/hyprland
state: touch
modification_time: preserve
access_time: preserve
mode: a+x
become: yes
- name: Write auto-hyprland login
ansible.builtin.blockinfile:
path: /etc/lemurs/wayland/hyprland
block: |
#! /bin/sh
exec Hyprland
become: yes