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:
|
|
|
|
name: yf
|
|
|
|
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:
|
|
|
|
name: yf
|
|
|
|
create_home: yes
|
|
|
|
groups: yf
|
|
|
|
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
|
|
|
|
2023-10-15 09:34:55 +00:00
|
|
|
- name: Give user yf max sudoers
|
|
|
|
community.general.sudoers:
|
|
|
|
name: main-user
|
|
|
|
state: present
|
|
|
|
user: yf
|
|
|
|
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
|
|
|
|
become_user: yf
|
2023-10-17 11:45:38 +00:00
|
|
|
|
2023-10-15 09:34:55 +00:00
|
|
|
- name: Creates getty autologin service folder
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /etc/systemd/system/getty@tty1.service.d
|
|
|
|
state: directory
|
|
|
|
become: yes
|
2023-10-17 11:45:38 +00:00
|
|
|
|
|
|
|
- name: Create skip-username.conf
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /etc/systemd/system/getty@tty1.service.d/skip-username.conf
|
|
|
|
state: touch
|
|
|
|
modification_time: preserve
|
|
|
|
access_time: preserve
|
|
|
|
become: yes
|
|
|
|
become_user: yf
|
|
|
|
|
2023-10-15 09:34:55 +00:00
|
|
|
- name: Insert block in getty config
|
|
|
|
ansible.builtin.blockinfile:
|
|
|
|
path: /etc/systemd/system/getty@tty1.service.d/skip-username.conf
|
|
|
|
block: |
|
|
|
|
[Service]
|
|
|
|
ExecStart=
|
2023-11-29 09:24:48 +00:00
|
|
|
ExecStart=-/sbin/agetty --skip-login - $TERM
|
2023-10-15 09:34:55 +00:00
|
|
|
Environment=XDG_SESSION_TYPE=wayland
|
|
|
|
become: yes
|
2023-10-17 11:45:38 +00:00
|
|
|
|
2023-10-15 09:34:55 +00:00
|
|
|
- name: Enable getty@tty1
|
|
|
|
ansible.builtin.systemd:
|
|
|
|
name: getty@tty1
|
|
|
|
enabled: true
|
|
|
|
become: yes
|
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:
|
|
|
|
repo: 'https://github.com/yourfriendoss/dots.git'
|
|
|
|
dest: /home/yf/.shell
|
|
|
|
become: yes
|
|
|
|
become_user: yf
|
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
|
|
|
|
become_user: yf
|
2023-10-17 11:45:38 +00:00
|
|
|
|
|
|
|
- name: Run stowt
|
2023-10-15 09:34:55 +00:00
|
|
|
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
|
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
|
|
|
|
- waybar-hyprland-git
|
|
|
|
- alacritty
|
|
|
|
- wl-clipboard
|
|
|
|
- slurp
|
|
|
|
- grim
|
|
|
|
- rofi-lbonn-wayland-git
|
|
|
|
- mako
|
|
|
|
- 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
|
|
|
|
- neofetch
|
2023-11-12 09:32:09 +00:00
|
|
|
- network-manager-applet
|
2023-11-29 09:25:18 +00:00
|
|
|
- pam_autologin
|
|
|
|
- swaylock
|
2023-10-15 09:34:55 +00:00
|
|
|
become: yes
|
|
|
|
become_user: yf
|
2023-10-17 11:45:38 +00:00
|
|
|
|
2023-10-15 09:34:55 +00:00
|
|
|
- name: Create .bash_profile
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /home/yf/.bash_profile
|
|
|
|
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
|
|
|
|
become_user: yf
|
2023-10-17 11:45:38 +00:00
|
|
|
|
2023-10-15 09:34:55 +00:00
|
|
|
- name: Write auto-hyprland login
|
|
|
|
ansible.builtin.blockinfile:
|
|
|
|
path: /home/yf/.bash_profile
|
|
|
|
block: |
|
|
|
|
if [[ "$(tty)" == "/dev/tty1" ]]
|
|
|
|
then
|
|
|
|
Hyprland
|
|
|
|
fi
|
|
|
|
become: yes
|
2023-11-29 09:24:48 +00:00
|
|
|
become_user: yf
|