Migrated to ansible
This commit is contained in:
98
roles/system/files/pacman.conf
Normal file
98
roles/system/files/pacman.conf
Normal file
@@ -0,0 +1,98 @@
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
[options]
|
||||
# The following paths are commented out with their default values listed.
|
||||
# If you wish to use different paths, uncomment and update the paths.
|
||||
#RootDir = /
|
||||
#DBPath = /var/lib/pacman/
|
||||
#CacheDir = /var/cache/pacman/pkg/
|
||||
#LogFile = /var/log/pacman.log
|
||||
#GPGDir = /etc/pacman.d/gnupg/
|
||||
#HookDir = /etc/pacman.d/hooks/
|
||||
HoldPkg = pacman glibc
|
||||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
#CleanMethod = KeepInstalled
|
||||
Architecture = auto
|
||||
|
||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||
#IgnorePkg =
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
|
||||
# Misc options
|
||||
#UseSyslog
|
||||
Color
|
||||
ILoveCandy
|
||||
#NoProgressBar
|
||||
CheckSpace
|
||||
#VerbosePkgLists
|
||||
ParallelDownloads = 5
|
||||
|
||||
# By default, pacman accepts packages signed by keys that its local keyring
|
||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
#RemoteFileSigLevel = Required
|
||||
|
||||
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
||||
# keyring can then be populated with the keys of all official Arch Linux
|
||||
# packagers with `pacman-key --populate archlinux`.
|
||||
|
||||
#
|
||||
# REPOSITORIES
|
||||
# - can be defined here or included from another file
|
||||
# - pacman will search repositories in the order defined here
|
||||
# - local/custom mirrors can be added here or in separate files
|
||||
# - repositories listed first will take precedence when packages
|
||||
# have identical names, regardless of version number
|
||||
# - URLs will have $repo replaced by the name of the current repo
|
||||
# - URLs will have $arch replaced by the name of the architecture
|
||||
#
|
||||
# Repository entries are of the format:
|
||||
# [repo-name]
|
||||
# Server = ServerName
|
||||
# Include = IncludePath
|
||||
#
|
||||
# The header [repo-name] is crucial - it must be present and
|
||||
# uncommented to enable the repo.
|
||||
#
|
||||
|
||||
# The testing repositories are disabled by default. To enable, uncomment the
|
||||
# repo name header and Include lines. You can add preferred servers immediately
|
||||
# after the header, and they will be used before the default mirrors.
|
||||
|
||||
#[core-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[extra-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# If you want to run 32 bit applications on your x86_64 system,
|
||||
# enable the multilib repositories as required here.
|
||||
|
||||
#[multilib-testing]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[multilib]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
||||
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