feat(ansible): new graphic drivers section and some other stuff

This commit is contained in:
Sergio Laín 2023-11-19 18:54:32 +01:00
parent c3e1cc9e42
commit 188dc169e3
No known key found for this signature in database
GPG key ID: 14C9B8080681777B
9 changed files with 110 additions and 14 deletions

View file

@ -1,9 +1,9 @@
- name: Setup Arch Linux - name: Setup Arch Linux
hosts: local hosts: local
roles: roles:
- role: packages
vars:
role_path: roles/arch
- role: system - role: system
vars: vars:
role_path: roles/arch role_path: roles/arch
- role: packages
vars:
role_path: roles/arch

View file

@ -1,9 +1,9 @@
- name: Setup Debian Linux - name: Setup Debian Linux
hosts: local hosts: local
roles: roles:
- role: packages
vars:
role_path: roles/debian
- role: system - role: system
vars: vars:
role_path: roles/debian role_path: roles/debian
- role: packages
vars:
role_path: roles/debian

View file

@ -0,0 +1,13 @@
- name: Install AMD Drivers
become: true
pacman:
update_cache: yes
name:
- xf86-video-amdgpu
- vulkan-radeon
- lib32-vulkan-radeon
- libva-mesa-driver
- lib32-libva-mesa-driver
- mesa
- mesa-vdpau
- lib32-mesa-vdpau

View file

@ -0,0 +1,13 @@
- name: Install Intel Drivers
become: true
pacman:
update_cache: yes
name:
- xf86-video-intel
- vulkan-intel
- libva-intel-driver
- lib32-vulkan-intel
- lib32-libva-intel-driver
- mesa
- mesa-vdpau
- lib32-mesa-vdpau

View file

@ -0,0 +1,8 @@
- name: Install NVIDIA Drivers
become: true
pacman:
update_cache: yes
name:
- nvidia
- nvidia-utils
- nvidia-settings

View file

@ -3,6 +3,10 @@
pacman: pacman:
update_cache: yes update_cache: yes
name: name:
# Base / Core
- amd-ucode
- intel-ucode
- android-file-transfer - android-file-transfer
- android-tools - android-tools
- baobab - baobab
@ -68,8 +72,26 @@
- zathura-pdf-mupdf - zathura-pdf-mupdf
# AUR # AUR
- name: Create the `aur_builder` user
become: true
ansible.builtin.user:
name: aur_builder
create_home: yes
group: wheel
- name: Allow the `aur_builder` user to run `sudo pacman` without a password
become: true
ansible.builtin.lineinfile:
path: /etc/sudoers.d/11-install-aur_builder
line: "aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman"
create: yes
validate: "visudo -cf %s"
- name: Install AUR Packages - name: Install AUR Packages
kewlfft.aur.aur: become: true
become_user: aur_builder
aur:
use: yay
name: name:
- amf-amdgpu-pro - amf-amdgpu-pro
- activitywatch-bin - activitywatch-bin
@ -133,3 +155,17 @@
- youtube-dl - youtube-dl
- ytdlp-gui - ytdlp-gui
- zarchive-git - zarchive-git
# Cargo
- name: Install Rust Packages
cargo:
name:
- cargo-update
# Npm
- name: Install Npm Packages
npm:
name:
- commitizen
- cz-git
global: true

View file

@ -1,9 +1,10 @@
- name: Ask user for type of install - name: Ask user for type of install and GPU drivers
hosts: all hosts: all
become: true become: true
gather_facts: false
vars_prompt: vars_prompt:
- name: install_input - name: install_choise
prompt: "What type of install do you want?" prompt: "What type of install do you want?"
choices: choices:
- "minimal" - "minimal"
@ -11,7 +12,19 @@
default: "minimal" default: "minimal"
private: no private: no
- name: gpu_driver_choice
prompt: "What drivers do you want for your gpu?"
choices:
- "NVIDIA"
- "AMD"
- "Intel"
private: no
block: block:
- name: Install packages for the system - name: Install packages for the system
include_tasks: "{{ install_input }}.yml" include_tasks: "{{ install_choice }}.yml"
when: install_input is defined when: install_choice is defined
- name: Install GPU drivers
include_tasks: "drivers/{{ gpu_driver_choice | lower }}.yml"
when: gpu_driver_choice is defined

View file

@ -58,6 +58,19 @@
regexp: '#MAKEFLAGS="-j2"' regexp: '#MAKEFLAGS="-j2"'
line: 'MAKEFLAGS="-j$(nproc)"' line: 'MAKEFLAGS="-j$(nproc)"'
- name: Create hooks directory
become: true
file:
path: /etc/pacman.d/hooks
state: directory
- name: Move hooks
become: true
synchronize:
src: ~/.config/pacman/hooks/
dest: /etc/pacman.d/hooks/
delegate_to: localhost
# FISH # FISH
- name: intall fish, fisher and other tools - name: intall fish, fisher and other tools
pacman: pacman:

View file

@ -54,6 +54,7 @@
"plugins.extras.formatting.rustfmt", "plugins.extras.formatting.rustfmt",
"plugins.extras.formatting.rustywind", "plugins.extras.formatting.rustywind",
"plugins.extras.formatting.sqlfmt", "plugins.extras.formatting.sqlfmt",
"plugins.extras.lang.ansible",
"plugins.extras.lang.bash", "plugins.extras.lang.bash",
"plugins.extras.lang.git", "plugins.extras.lang.git",
"plugins.extras.lang.markdown-extended", "plugins.extras.lang.markdown-extended",
@ -65,10 +66,10 @@
"plugins.extras.linting.pylint", "plugins.extras.linting.pylint",
"plugins.extras.linting.shellcheck", "plugins.extras.linting.shellcheck",
"plugins.extras.lsp.compiler", "plugins.extras.lsp.compiler",
"plugins.extras.lsp.garbage-day",
"plugins.extras.lsp.lens", "plugins.extras.lsp.lens",
"plugins.extras.lsp.lightbulb", "plugins.extras.lsp.lightbulb",
"plugins.extras.lsp.lsp-extended", "plugins.extras.lsp.lsp-extended",
"plugins.extras.lsp.garbage-day",
"plugins.extras.ui.alpha", "plugins.extras.ui.alpha",
"plugins.extras.ui.block", "plugins.extras.ui.block",
"plugins.extras.ui.breadcrumbs", "plugins.extras.ui.breadcrumbs",
@ -93,4 +94,3 @@
}, },
"version": 2 "version": 2
} }