Migrated to ansible
This commit is contained in:
269
roles/system/tasks/Archlinux.yml
Normal file
269
roles/system/tasks/Archlinux.yml
Normal file
@@ -0,0 +1,269 @@
|
||||
---
|
||||
- name: "[Arch] Configure pacman"
|
||||
ansible.builtin.copy:
|
||||
mode: 0644
|
||||
src: "pacman.conf"
|
||||
dest: "/etc/"
|
||||
become: true
|
||||
tags:
|
||||
- pacman
|
||||
|
||||
- name: "[Arch] Update packages"
|
||||
community.general.pacman:
|
||||
update_cache: true
|
||||
upgrade: true
|
||||
state: latest
|
||||
become: true
|
||||
tags:
|
||||
- pacman
|
||||
|
||||
- name: "[Arch] Install default packages"
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- networkmanager
|
||||
- networkmanager-openvpn
|
||||
- network-manager-applet
|
||||
- inotify-tools
|
||||
- cifs-utils
|
||||
- ntfs-3g
|
||||
- openssh
|
||||
- upower
|
||||
- unzip
|
||||
- less
|
||||
- curl
|
||||
- wget
|
||||
- awk
|
||||
- zip
|
||||
- tar
|
||||
- eza
|
||||
- bat
|
||||
- jq
|
||||
use: paru
|
||||
state: present
|
||||
tags:
|
||||
- default_pkgs
|
||||
|
||||
- name: "[Arch] Install programming packages"
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- jdk-openjdk
|
||||
- maven
|
||||
- rustup
|
||||
- npm
|
||||
use: paru
|
||||
state: present
|
||||
tags:
|
||||
- programming_pkgs
|
||||
when: system != 'server'
|
||||
|
||||
- name: "[Arch] Configure rustup"
|
||||
command: rustup default stable
|
||||
tags:
|
||||
- programming_pkgs
|
||||
when: system != 'server'
|
||||
|
||||
- name: "[Arch] Install desktop packages"
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
# Fonts
|
||||
- noto-fonts
|
||||
- noto-fonts-cjk
|
||||
- noto-fonts-emoji
|
||||
- ttf-font-awesome
|
||||
- ttf-firacode-nerd
|
||||
# Pipewire
|
||||
- pipewire
|
||||
- wireplumber
|
||||
- pipewire-alsa
|
||||
- pipewire-audio
|
||||
- pipewire-jack
|
||||
- pipewire-pulse
|
||||
- gst-plugin-pipewire
|
||||
# Bluetooth
|
||||
- bluez
|
||||
- bluez-utils
|
||||
- blueman
|
||||
# Printing
|
||||
- cups
|
||||
- cups-pdf
|
||||
# Theming
|
||||
#- qt5ct
|
||||
- nwg-look
|
||||
# Icon Themes
|
||||
- papirus-icon-theme
|
||||
# Cursor Themes
|
||||
- rose-pine-hyprcursor
|
||||
- xcursor-breeze
|
||||
# Themes
|
||||
- catppuccin-gtk-theme-frappe
|
||||
- catppuccin-gtk-theme-latte
|
||||
- catppuccin-gtk-theme-macchiato
|
||||
- catppuccin-gtk-theme-mocha
|
||||
# Misc
|
||||
- brightnessctl
|
||||
#- wlr-randr
|
||||
- playerctl
|
||||
- libnotify
|
||||
- mediainfo
|
||||
- hyprpicker
|
||||
- swww
|
||||
- swayidle
|
||||
- grimblast-git
|
||||
- cliphist
|
||||
- wl-clipboard
|
||||
- polkit-kde-agent
|
||||
- xdg-desktop-portal-hyprland
|
||||
- gnome-keyring
|
||||
use: paru
|
||||
state: present
|
||||
tags:
|
||||
- desktop_pkgs
|
||||
when: system != 'server'
|
||||
|
||||
- name: "[Arch] Install desktop applications"
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- youtube-music
|
||||
- libreoffice-fresh
|
||||
- nextcloud-client
|
||||
- youtube-music
|
||||
- waypaper-git
|
||||
- vscodium-bin
|
||||
- pavucontrol
|
||||
- hyprpicker
|
||||
- brave-bin
|
||||
- obsidian
|
||||
- discord
|
||||
- yt-dlp
|
||||
- nvtop
|
||||
- nemo
|
||||
- mpv
|
||||
# Device configuration
|
||||
#- openrazer-daemon
|
||||
#- openrgb
|
||||
#- piper
|
||||
# AMD Stats
|
||||
#- amdgpu_top
|
||||
# Character map
|
||||
#- gucharmap
|
||||
# Calculator
|
||||
#- galculator
|
||||
use: paru
|
||||
state: present
|
||||
tags:
|
||||
- desktop_apps
|
||||
when: system != 'server'
|
||||
|
||||
- name: "[Arch] Install additional desktop packages"
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- steam
|
||||
- lutris
|
||||
# Wine
|
||||
- wine-staging
|
||||
- giflib
|
||||
- lib32-giflib
|
||||
- libpng
|
||||
- lib32-libpng
|
||||
- libldap
|
||||
- lib32-libldap
|
||||
- gnutls
|
||||
- lib32-gnutls
|
||||
- mpg123
|
||||
- lib32-mpg123
|
||||
- openal
|
||||
- lib32-openal
|
||||
- v4l-utils
|
||||
- lib32-v4l-utils
|
||||
- libpulse
|
||||
- lib32-libpulse
|
||||
- libgpg-error
|
||||
- lib32-libgpg-error
|
||||
- alsa-plugins
|
||||
- lib32-alsa-plugins
|
||||
- alsa-lib
|
||||
- lib32-alsa-lib
|
||||
- libjpeg-turbo
|
||||
- lib32-libjpeg-turbo
|
||||
- sqlite
|
||||
- lib32-sqlite
|
||||
- libxcomposite
|
||||
- lib32-libxcomposite
|
||||
- libxinerama
|
||||
- lib32-libgcrypt
|
||||
- libgcrypt
|
||||
- lib32-libxinerama
|
||||
- ncurses
|
||||
- lib32-ncurses
|
||||
- ocl-icd
|
||||
- lib32-ocl-icd
|
||||
- libxslt
|
||||
- lib32-libxslt
|
||||
- libva
|
||||
- lib32-libva
|
||||
- gtk3
|
||||
- lib32-gtk3
|
||||
- gst-plugins-base-libs
|
||||
- lib32-gst-plugins-base-libs
|
||||
- vulkan-icd-loader
|
||||
- lib32-vulkan-icd-loader
|
||||
use: paru
|
||||
state: present
|
||||
tags:
|
||||
- desktop_pkgs
|
||||
when: system == 'desktop_full'
|
||||
|
||||
- name: Gather GPU info
|
||||
shell: "lspci | grep -i vga"
|
||||
register: gpu_info
|
||||
tags:
|
||||
- desktop_pkgs
|
||||
when: system == 'desktop_full'
|
||||
|
||||
- name: "[Arch] Install AMD packages"
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- lib32-mesa
|
||||
- vulkan-radeon
|
||||
- lib32-vulkan-radeon
|
||||
use: paru
|
||||
state: present
|
||||
when: "system == 'desktop_full' and 'Advanced Micro Devices' in gpu_info.stdout"
|
||||
|
||||
- name: "[Arch] Install Intel packages"
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- lib32-mesa
|
||||
- vulkan-intel
|
||||
- lib32-vulkan-intel
|
||||
use: paru
|
||||
state: present
|
||||
tags:
|
||||
- desktop_pkgs
|
||||
when: "system == 'desktop_full' and 'Intel Corporation' in gpu_info.stdout"
|
||||
|
||||
- name: "[Arch] Install Nvidia packages"
|
||||
kewlfft.aur.aur:
|
||||
name:
|
||||
- nvidia-dkms
|
||||
- nvidia-utils
|
||||
- lib32-nvidia-utils
|
||||
- nvidia-settings
|
||||
use: paru
|
||||
state: present
|
||||
tags:
|
||||
- desktop_pkgs
|
||||
when: "system == 'desktop_full' and 'NVIDIA' in gpu_info.stdout"
|
||||
|
||||
- name: "[Arch] Enable services"
|
||||
ansible.builtin.service:
|
||||
name: "{{ item }}"
|
||||
enabled: true
|
||||
with_items:
|
||||
- bluetooth
|
||||
- cups
|
||||
- sddm
|
||||
tags:
|
||||
- desktop_services
|
||||
when: "system == 'desktop'"
|
||||
become: true
|
||||
11
roles/system/tasks/main.yml
Normal file
11
roles/system/tasks/main.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: "[System] Checking for Distribution Config: {{ ansible_distribution }}"
|
||||
ansible.builtin.stat:
|
||||
path: "{{ role_path }}/tasks/{{ ansible_distribution }}.yml"
|
||||
register: system_distribution_config
|
||||
tags:
|
||||
- system
|
||||
|
||||
- name: "[System] Run Tasks: {{ ansible_distribution }}"
|
||||
ansible.builtin.include_tasks: "{{ ansible_distribution }}.yml"
|
||||
when: system_distribution_config.stat.exists
|
||||
Reference in New Issue
Block a user