dots/play.yml

192 lines
4.9 KiB
YAML
Raw Permalink Normal View History

2023-10-17 11:45:38 +00:00
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠀⠀⠀⡠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⣀⣠⡤⣀⣀⡀⠀⠀⠀⠑⡀⠈⠂⡠⣠⠊⠀⢀⠜⠀⠀⠀⠀⣀⣀⠀⠀⠀⠀⠀
2023-10-15 09:34:55 +00:00
#⠈⢿⣭⡍⠩⠉⠄⢛⡲⠤⣀⠸⣄⣿⣿⣿⣷⣴⣡⠤⣒⠩⠝⢩⡙⠫⠝⠛⣶
2023-10-17 11:45:38 +00:00
#⠀⠀⠉⢖⠒⠒⠒⠀⠐⠚⠷⣺⣇⠀⠀⠀⠋⣿⠿⣗⣀⡉⠉⠩⣭⣤⣽⠿⠋⠀
#⠀⠀⠀⠈⠓⠠⠤⠬⠷⠖⢋⡽⣿⣷⢄⣸⣼⣿⣍⠓⠥⢍⣶⣤⡍⠔⠂⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⡴⢩⣾⣿⣛⢟⠿⢿⣷⡌⠱⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠂⠉⠰⡟⣯⣍⠙⠛⠛⢛⣿⣗⡄⠈⠀⠃⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠿⠁⣯⣙⠛⠿⠟⢻⣿⠛⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠘⢿⡻⠿⠾⣻⠏⠀⡅⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠜⠀⠀⠀⠉⠙⠋⠁⠀⠀⠘⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
2023-10-15 09:34:55 +00:00
# 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
2023-10-17 11:45:38 +00:00
2023-10-15 09:34:55 +00:00
- name: Create user group
ansible.builtin.group:
2024-05-20 15:07:58 +00:00
name: sophie
2023-10-15 09:34:55 +00:00
state: present
become: yes
2023-10-17 11:45:38 +00:00
2023-10-15 09:34:55 +00:00
- name: Create user
ansible.builtin.user:
2024-05-20 15:07:58 +00:00
name: sophie
2023-10-15 09:34:55 +00:00
create_home: yes
2024-05-20 15:07:58 +00:00
groups: sophie
2023-10-15 09:34:55 +00:00
append: yes
state: present
become: yes
2023-10-17 11:45:38 +00:00
2023-10-15 09:34:55 +00:00
- name: Install sudo
community.general.pacman:
name:
- sudo
state: present
become: yes
2023-10-17 11:45:38 +00:00
2024-05-20 15:07:58 +00:00
- name: Give user sophie max sudoers
2023-10-15 09:34:55 +00:00
community.general.sudoers:
name: main-user
state: present
2024-05-20 15:07:58 +00:00
user: sophie
2023-10-15 09:34:55 +00:00
runas: ALL
commands: ALL
become: yes
2023-10-17 11:45:38 +00:00
- name: Install yay prerequisites
community.general.pacman:
name:
- make
- gcc
- fakeroot
state: present
become: yes
2023-10-15 09:34:55 +00:00
- name: Install yay using makepkg if it isn't installed already
kewlfft.aur.aur:
name: yay
use: makepkg
state: present
become: yes
2024-05-20 15:07:58 +00:00
become_user: sophie
2023-10-17 11:45:38 +00:00
2023-10-15 09:34:55 +00:00
- name: Install stow
community.general.pacman:
name:
- stow
state: present
become: yes
2023-10-17 11:45:38 +00:00
2023-10-15 09:34:55 +00:00
- name: Clone my dotfiles
ansible.builtin.git:
2024-05-20 15:07:58 +00:00
repo: 'https://git.sad.ovh/sophie/dots.git'
dest: /home/sophie/.shell
2023-10-15 09:34:55 +00:00
become: yes
2024-05-20 15:07:58 +00:00
become_user: sophie
2023-10-17 11:45:38 +00:00
2023-10-15 09:34:55 +00:00
- name: Upgrade the system using yay
kewlfft.aur.aur:
upgrade: yes
use: yay
become: yes
2024-05-20 15:07:58 +00:00
become_user: sophie
2024-04-07 15:46:09 +00:00
- name: Run stow
2024-05-20 15:07:58 +00:00
ansible.builtin.shell: "stow . --target=/home/sophie/ --verbose=2"
2023-10-15 09:34:55 +00:00
args:
2024-05-20 15:07:58 +00:00
chdir: /home/sophie/.shell/src
2023-10-15 09:34:55 +00:00
register: result
changed_when: 'result.stderr is search("LINK: ")'
become: yes
2024-05-20 15:07:58 +00:00
become_user: sophie
2023-10-17 11:45:38 +00:00
- name: Install everything
2023-10-15 09:34:55 +00:00
kewlfft.aur.aur:
use: yay
2023-10-17 11:45:38 +00:00
name: "{{ item }}"
2023-10-15 09:34:55 +00:00
state: present
extra_args: "--needed"
2023-10-17 11:45:38 +00:00
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
2024-05-20 15:07:58 +00:00
- aylurs-gtk-shell
- foot
- nushell
2023-10-17 11:45:38 +00:00
- wl-clipboard
- slurp
- grim
- rofi-lbonn-wayland-git
- swww
- thunar
- gvfs
- gvfs-smb
- spotify
- spicetify-cli
- ttf-jetbrains-mono-nerd
2023-11-12 09:21:40 +00:00
- vencord-desktop-git
2023-10-17 11:45:38 +00:00
- vivaldi
- wps-office
- ttf-wps-fonts
- visual-studio-code-bin
- pipes.sh
2024-05-15 21:00:50 +00:00
- fastfetch
2023-11-12 09:32:09 +00:00
- network-manager-applet
2024-04-07 15:46:09 +00:00
- lemurs
- syncthing
2023-10-15 09:34:55 +00:00
become: yes
2024-05-20 15:07:58 +00:00
become_user: sophie
2023-10-17 11:45:38 +00:00
2023-10-15 09:34:55 +00:00
- name: Create .bash_profile
ansible.builtin.file:
2024-05-20 15:07:58 +00:00
path: /home/sophie/.bash_profile
2023-10-15 09:34:55 +00:00
state: touch
2023-10-17 11:45:38 +00:00
modification_time: preserve
access_time: preserve
2023-10-15 09:34:55 +00:00
become: yes
2024-05-20 15:07:58 +00:00
become_user: sophie
2024-04-07 15:46:09 +00:00
- name: Enable lemurs
ansible.builtin.systemd:
name: lemurs
enabled: true
become: yes
2024-04-09 09:55:22 +00:00
- name: Create lemurs wayland dir
2024-04-07 15:46:09 +00:00
ansible.builtin.file:
path: /etc/lemurs/wayland/
state: directory
become: yes
2024-04-09 09:55:22 +00:00
- 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
2023-10-15 09:34:55 +00:00
- name: Write auto-hyprland login
ansible.builtin.blockinfile:
2024-04-07 15:46:09 +00:00
path: /etc/lemurs/wayland/hyprland
2023-10-15 09:34:55 +00:00
block: |
2024-04-07 15:46:09 +00:00
#! /bin/sh
exec Hyprland
2023-10-15 09:34:55 +00:00
become: yes
2024-05-20 15:07:58 +00:00
- name: Set GTK interface theme
ansible.builtin.shell: "gsettings set org.gnome.desktop.interface gtk-theme 'Catppuccin-Latte-Standard-Pink-Light'"
become: yes
become_user: sophie