✨ feat(ansible): new graphic drivers section and some other stuff
This commit is contained in:
parent
c3e1cc9e42
commit
188dc169e3
9 changed files with 110 additions and 14 deletions
|
@ -1,9 +1,9 @@
|
|||
- name: Setup Arch Linux
|
||||
hosts: local
|
||||
roles:
|
||||
- role: packages
|
||||
vars:
|
||||
role_path: roles/arch
|
||||
- role: system
|
||||
vars:
|
||||
role_path: roles/arch
|
||||
- role: packages
|
||||
vars:
|
||||
role_path: roles/arch
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
- name: Setup Debian Linux
|
||||
hosts: local
|
||||
roles:
|
||||
- role: packages
|
||||
vars:
|
||||
role_path: roles/debian
|
||||
- role: system
|
||||
vars:
|
||||
role_path: roles/debian
|
||||
- role: packages
|
||||
vars:
|
||||
role_path: roles/debian
|
||||
|
|
13
.config/ansible/roles/arch/packages/tasks/drivers/amd.yml
Normal file
13
.config/ansible/roles/arch/packages/tasks/drivers/amd.yml
Normal 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
|
13
.config/ansible/roles/arch/packages/tasks/drivers/intel.yml
Normal file
13
.config/ansible/roles/arch/packages/tasks/drivers/intel.yml
Normal 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
|
|
@ -0,0 +1,8 @@
|
|||
- name: Install NVIDIA Drivers
|
||||
become: true
|
||||
pacman:
|
||||
update_cache: yes
|
||||
name:
|
||||
- nvidia
|
||||
- nvidia-utils
|
||||
- nvidia-settings
|
|
@ -3,6 +3,10 @@
|
|||
pacman:
|
||||
update_cache: yes
|
||||
name:
|
||||
# Base / Core
|
||||
- amd-ucode
|
||||
- intel-ucode
|
||||
|
||||
- android-file-transfer
|
||||
- android-tools
|
||||
- baobab
|
||||
|
@ -68,8 +72,26 @@
|
|||
- zathura-pdf-mupdf
|
||||
|
||||
# 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
|
||||
kewlfft.aur.aur:
|
||||
become: true
|
||||
become_user: aur_builder
|
||||
aur:
|
||||
use: yay
|
||||
name:
|
||||
- amf-amdgpu-pro
|
||||
- activitywatch-bin
|
||||
|
@ -133,3 +155,17 @@
|
|||
- youtube-dl
|
||||
- ytdlp-gui
|
||||
- zarchive-git
|
||||
|
||||
# Cargo
|
||||
- name: Install Rust Packages
|
||||
cargo:
|
||||
name:
|
||||
- cargo-update
|
||||
|
||||
# Npm
|
||||
- name: Install Npm Packages
|
||||
npm:
|
||||
name:
|
||||
- commitizen
|
||||
- cz-git
|
||||
global: true
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
- name: Ask user for type of install
|
||||
- name: Ask user for type of install and GPU drivers
|
||||
hosts: all
|
||||
become: true
|
||||
gather_facts: false
|
||||
|
||||
vars_prompt:
|
||||
- name: install_input
|
||||
- name: install_choise
|
||||
prompt: "What type of install do you want?"
|
||||
choices:
|
||||
- "minimal"
|
||||
|
@ -11,7 +12,19 @@
|
|||
default: "minimal"
|
||||
private: no
|
||||
|
||||
- name: gpu_driver_choice
|
||||
prompt: "What drivers do you want for your gpu?"
|
||||
choices:
|
||||
- "NVIDIA"
|
||||
- "AMD"
|
||||
- "Intel"
|
||||
private: no
|
||||
|
||||
block:
|
||||
- name: Install packages for the system
|
||||
include_tasks: "{{ install_input }}.yml"
|
||||
when: install_input is defined
|
||||
include_tasks: "{{ install_choice }}.yml"
|
||||
when: install_choice is defined
|
||||
|
||||
- name: Install GPU drivers
|
||||
include_tasks: "drivers/{{ gpu_driver_choice | lower }}.yml"
|
||||
when: gpu_driver_choice is defined
|
||||
|
|
|
@ -58,6 +58,19 @@
|
|||
regexp: '#MAKEFLAGS="-j2"'
|
||||
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
|
||||
- name: intall fish, fisher and other tools
|
||||
pacman:
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
"plugins.extras.formatting.rustfmt",
|
||||
"plugins.extras.formatting.rustywind",
|
||||
"plugins.extras.formatting.sqlfmt",
|
||||
"plugins.extras.lang.ansible",
|
||||
"plugins.extras.lang.bash",
|
||||
"plugins.extras.lang.git",
|
||||
"plugins.extras.lang.markdown-extended",
|
||||
|
@ -65,10 +66,10 @@
|
|||
"plugins.extras.linting.pylint",
|
||||
"plugins.extras.linting.shellcheck",
|
||||
"plugins.extras.lsp.compiler",
|
||||
"plugins.extras.lsp.garbage-day",
|
||||
"plugins.extras.lsp.lens",
|
||||
"plugins.extras.lsp.lightbulb",
|
||||
"plugins.extras.lsp.lsp-extended",
|
||||
"plugins.extras.lsp.garbage-day",
|
||||
"plugins.extras.ui.alpha",
|
||||
"plugins.extras.ui.block",
|
||||
"plugins.extras.ui.breadcrumbs",
|
||||
|
@ -93,4 +94,3 @@
|
|||
},
|
||||
"version": 2
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue