1
0
Fork 0

Update sysinstall

This commit is contained in:
J. Elfring 2024-11-05 21:05:54 +01:00
parent bd8bbb9615
commit f3cc43d3df
5 changed files with 202 additions and 195 deletions

View file

@ -170,8 +170,8 @@ fbcon=rotate:1 rotates the display. This is ONLY NEEDED on device like GPD Pocke
## More configuration ## More configuration
- Perform basic systemconfiguration - Perform basic systemconfiguration
``` ```
$ git clone https://github.com/elfrinjo/syssetup $ git clone https://code.elfring.ms/elfrinjo/dotfiles2000
$ cd syssetup/dotfiles $ cd dotfiles2000/dotfiles
$ stow */ $ stow */
$ cd ../system/arch $ cd ../system/arch
$ sudo ansible-playbook baseconfig.yaml $ sudo ansible-playbook baseconfig.yaml
@ -203,8 +203,8 @@ $ sudo wifi-menu
``` ```
- Perform more system configuration - Perform more system configuration
``` ```
$ git clone https://github.com/elfrinjo/dotfiles $ git clone https://code.elfring.ms/elfrinjo/dotfiles2000
$ cd syssetup/dotfiles $ cd dotfiles2000/dotfiles
$ stow */ $ stow */
$ cd ../system/arch $ cd ../system/arch
$ sudo ansible-playbook workstation.yaml $ sudo ansible-playbook workstation.yaml

View file

@ -4,23 +4,28 @@
tasks: tasks:
- name: "Update pacman cache"
community.general.pacman:
update_cache: True
- name: "Install base packages" - name: "Install base packages"
package: ansible.builtin.package:
name: name: '{{ item }}'
- fortune-mod
- git
- make
- openssh
- pass
- pass-otp
- rsync
- sudo
- vim
state: present state: present
update_cache: true update_cache: False
with_items:
- fortune-mod
- git
- make
- openssh
- pass
- pass-otp
- rsync
- sudo
- vim
- name: "Remove unwanted packages" - name: "Remove unwanted packages"
package: ansible.builtin.package:
name: name:
- puppet - puppet
state: absent state: absent
@ -28,7 +33,7 @@
- name: "Console settings" - name: "Console settings"
when: "'gpd' not in ansible_hostname" when: "'gpd' not in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/vconsole.conf dest: /etc/vconsole.conf
owner: root owner: root
group: root group: root
@ -38,7 +43,7 @@
- name: "Console settings (GPD Pocket 2)" - name: "Console settings (GPD Pocket 2)"
when: "'gpd' in ansible_hostname" when: "'gpd' in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/vconsole.conf dest: /etc/vconsole.conf
owner: root owner: root
group: root group: root
@ -48,7 +53,7 @@
FONT=latarcyrheb-sun32 FONT=latarcyrheb-sun32
- name: "Localization: Set papersize" - name: "Localization: Set papersize"
copy: ansible.builtin.copy:
dest: /etc/papersize dest: /etc/papersize
owner: root owner: root
group: root group: root
@ -57,13 +62,13 @@
a4 a4
- name: "Localization: Set timezone" - name: "Localization: Set timezone"
file: ansible.builtin.file:
dest: /etc/localtime dest: /etc/localtime
src: /usr/share/zoneinfo/Europe/Berlin src: /usr/share/zoneinfo/Europe/Berlin
state: link state: link
- name: "Localization: locale.conf" - name: "Localization: locale.conf"
copy: ansible.builtin.copy:
dest: /etc/locale.conf" dest: /etc/locale.conf"
owner: root owner: root
group: root group: root
@ -86,7 +91,7 @@
- name: "Localization: locale.gen" - name: "Localization: locale.gen"
register: locale_gen register: locale_gen
copy: ansible.builtin.copy:
dest: /etc/locale.gen dest: /etc/locale.gen
owner: root owner: root
group: root group: root
@ -97,17 +102,17 @@
en_US.UTF-8 UTF-8 en_US.UTF-8 UTF-8
- name: "Localization: Regenerate locale" - name: "Localization: Regenerate locale"
command: "/usr/bin/locale-gen"
when: locale_gen.changed when: locale_gen.changed
ansible.builtin.command: "/usr/bin/locale-gen"
- name: "Use systemd-timesyncd" - name: "Use systemd-timesyncd"
service: ansible.builtin.service:
name: systemd-timesyncd name: systemd-timesyncd
state: started state: started
enabled: yes enabled: yes
- name: "Sudo: config file" - name: "Sudo: config file"
copy: ansible.builtin.copy:
dest: /etc/sudoers dest: /etc/sudoers
src: ./lib/etc/sudoers src: ./lib/etc/sudoers
owner: root owner: root
@ -115,7 +120,7 @@
mode: 0440 mode: 0440
- name: "Sudo: Create groups" - name: "Sudo: Create groups"
group: ansible.builtin.group:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
system: true system: true
@ -125,7 +130,7 @@
- name: "Pacman configuration" - name: "Pacman configuration"
when: "'arm' not in ansible_machine" when: "'arm' not in ansible_machine"
copy: ansible.builtin.copy:
dest: /etc/pacman.conf dest: /etc/pacman.conf
src: ./lib/etc/pacman.conf src: ./lib/etc/pacman.conf
owner: root owner: root
@ -134,7 +139,7 @@
- name: "Pacman configuration (ARM)" - name: "Pacman configuration (ARM)"
when: "'arm' in ansible_machine" when: "'arm' in ansible_machine"
copy: ansible.builtin.copy:
dest: /etc/pacman.conf dest: /etc/pacman.conf
src: ./lib/etc/pacman.conf.arm src: ./lib/etc/pacman.conf.arm
owner: root owner: root

View file

@ -4,153 +4,154 @@
tasks: tasks:
- name: "Install workstation packages" - name: "Update pacman cache"
package: community.general.pacman:
name:
- acpi
- alacritty
- aspell
- aspell-de
- aspell-en
- bash
- bash-completion
- binutils
- blueman
- bluez-utils
- brightnessctl
- coreutils
- cryptsetup
- curl
- device-mapper
- dialog
- diffutils
- dos2unix
- dosfstools
- e2fsprogs
- file
- filesystem
- findutils
- firefox
- firefox-i18n-de
- gnu-netcat
- grep
- gzip
- imagemagick
- inetutils
- ispell
- less
- libreoffice-fresh
- licenses
- light
- lightdm
- lightdm-gtk-greeter
- lightdm-gtk-greeter-settings
- linux
- linux-headers
- lm_sensors
- lshw
- lvm2
- man-db
- man-pages
- mc
- mplayer
- nano
- network-manager-applet
- networkmanager
- nmap
- nmon
- pcmanfm-gtk3
- perl
- perl-date-manip
- powerline-fonts
- qrencode
- screenfetch
- sed
- strace
- texinfo
- texlive-bibtexextra
- texlive-core
- texlive-fontsextra
- texlive-formatsextra
- texlive-games
- texlive-humanities
- texlive-latexextra
- texlive-music
- texlive-pictures
- texlive-pstricks
- texlive-publishers
- texlive-science
- tree
- ttf-3270-nerd
- ttf-cousine-nerd
- ttf-envycoder-nerd
- ttf-font-awesome
- ttf-hack-nerd
- ttf-inconsolata-nerd
- unzip
- usbutils
- w3m
- wget
- wpa_supplicant
- xdot
- zathura
- zathura-pdf-mupdf
state: present
update_cache: True update_cache: True
- name: "Install workstation packages"
ansible.builtin.package:
name: '{{ item }}'
state: present
update_cache: False
with_items:
- acpi
- bash
- bash-completion
- binutils
- blueman
- bluez-utils
- brightnessctl
- coreutils
- cryptsetup
- curl
- device-mapper
- dialog
- diffutils
- dos2unix
- dosfstools
- e2fsprogs
- file
- filesystem
- findutils
- firefox
- firefox-i18n-de
- gnu-netcat
- grep
- gzip
- imagemagick
- inetutils
- less
- licenses
- lightdm
- lightdm-gtk-greeter
- lightdm-gtk-greeter-settings
- linux
- linux-headers
- lm_sensors
- lshw
- lvm2
- man-db
- man-pages
- mc
- mplayer
- nano
- network-manager-applet
- networkmanager
- nmap
- nmon
- pcmanfm-gtk3
- perl
- perl-date-manip
- powerline-fonts
- qrencode
- screenfetch
- sed
- strace
- texinfo
- texlive-bibtexextra
- texlive-core
- texlive-fontsextra
- texlive-formatsextra
- texlive-games
- texlive-humanities
- texlive-latexextra
- texlive-music
- texlive-pictures
- texlive-pstricks
- texlive-publishers
- texlive-science
- tree
- ttf-3270-nerd
- ttf-cousine-nerd
- ttf-envycoder-nerd
- ttf-font-awesome
- ttf-hack-nerd
- ttf-inconsolata-nerd
- unzip
- usbutils
- w3m
- wget
- wpa_supplicant
- xdot
- zathura
- zathura-pdf-mupdf
- name: "Install X packages" - name: "Install X packages"
package: ansible.builtin.package:
name: name: '{{ item }}'
- arandr
- autorandr
- clipmenu
- dmenu
- dunst
- feh
- i3-wm
- i3lock
- i3status
- i3status-rust
- rofi
- scrot
- xautolock
- xclip
- xdot
- xf86-input-libinput
- xorg-apps
- xorg-xclipboard
- xorg-server
state: present state: present
update_cache: True update_cache: False
with_items:
- alacritty
- arandr
- autorandr
- clipmenu
- dmenu
- dunst
- feh
- i3-wm
- i3lock
- i3status-rust
- rofi
- scrot
- xautolock
- xclip
- xdot
- xf86-input-libinput
- xorg-apps
- xorg-xclipboard
- xorg-server
- name: "Install hypr packages" - name: "Install hypr packages"
package: ansible.builtin.package:
name: name: '{{ item }}'
- hyprland
- hyprlock
- hypridle
- hyprpicker
- hyprshot
- hyprpaper
- cliphist
- wofi
- waybar
- kitty
- qt6-wayland
- xdg-desktop-portal-hyprland
state: present state: present
update_cache: True update_cache: False
with_items:
- hyprland
- hyprlock
- hypridle
- hyprpicker
- hyprpaper
- cliphist
- wofi
- waybar
- kitty
- qt6-wayland
- xdg-desktop-portal-hyprland
- name: "Remove unwanted packages" - name: "Remove unwanted packages"
package: ansible.builtin.package:
name: '{{ item }}' name: '{{ item }}'
state: absent state: absent
update_cache: True update_cache: False
force: True
with_items: with_items:
- jack2
- xf86-input-synaptics - xf86-input-synaptics
- name: "Install Audio System" - name: "Install Audio System"
package: ansible.builtin.package:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
update_cache: False update_cache: False
@ -167,12 +168,12 @@
- wireplumber - wireplumber
- name: "Systemd: Disable reboot on ctrl+alt+del" - name: "Systemd: Disable reboot on ctrl+alt+del"
systemd: ansible.builtin.systemd:
name: ctrl-alt-del.target name: ctrl-alt-del.target
masked: yes masked: yes
- name: "Systemd: logind.conf" - name: "Systemd: logind.conf"
copy: ansible.builtin.copy:
dest: /etc/systemd/logind.conf dest: /etc/systemd/logind.conf
src: ./lib/etc/systemd/logind.conf src: ./lib/etc/systemd/logind.conf
owner: root owner: root
@ -180,7 +181,7 @@
mode: 0644 mode: 0644
- name: "Lightdm: greeter config" - name: "Lightdm: greeter config"
copy: ansible.builtin.copy:
dest: /etc/lightdm/lightdm-gtk-greeter.conf dest: /etc/lightdm/lightdm-gtk-greeter.conf
src: ./lib/etc/lightdm/lightdm-gtk-greeter.conf src: ./lib/etc/lightdm/lightdm-gtk-greeter.conf
owner: root owner: root
@ -188,7 +189,7 @@
mode: 0644 mode: 0644
- name: "Lightdm: config" - name: "Lightdm: config"
copy: ansible.builtin.copy:
dest: /etc/lightdm/lightdm.conf dest: /etc/lightdm/lightdm.conf
src: ./lib/etc/lightdm/lightdm.conf src: ./lib/etc/lightdm/lightdm.conf
owner: root owner: root
@ -196,7 +197,7 @@
mode: 0644 mode: 0644
- name: "Pam: Login" - name: "Pam: Login"
copy: ansible.builtin.copy:
dest: /etc/pam.d/login dest: /etc/pam.d/login
src: ./lib/etc/pam.d/login src: ./lib/etc/pam.d/login
owner: root owner: root
@ -204,7 +205,7 @@
mode: 0644 mode: 0644
- name: "Pam: Passwd" - name: "Pam: Passwd"
copy: ansible.builtin.copy:
dest: /etc/pam.d/passwd dest: /etc/pam.d/passwd
src: ./lib/etc/pam.d/passwd src: ./lib/etc/pam.d/passwd
owner: root owner: root
@ -212,19 +213,19 @@
mode: 0644 mode: 0644
- name: "Service: No netctl" - name: "Service: No netctl"
service: ansible.builtin.service:
name: netctl.service name: netctl.service
state: stopped state: stopped
enabled: no enabled: no
- name: "Service: NetworkManager" - name: "Service: NetworkManager"
service: ansible.builtin.service:
name: NetworkManager.service name: NetworkManager.service
state: started state: started
enabled: yes enabled: yes
- name: "Service: lightdm" - name: "Service: lightdm"
service: ansible.builtin.service:
name: lightdm.service name: lightdm.service
state: started state: started
enabled: yes enabled: yes
@ -232,7 +233,7 @@
## X11 ## X11
- name: "X11: Keyboard" - name: "X11: Keyboard"
when: "'gpd' not in ansible_hostname" when: "'gpd' not in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/00-keyboard.conf dest: /etc/X11/xorg.conf.d/00-keyboard.conf
src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf
owner: root owner: root
@ -241,7 +242,7 @@
- name: "X11: Touchpad" - name: "X11: Touchpad"
when: "'gpd' not in ansible_hostname" when: "'gpd' not in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/50-touchpad.conf dest: /etc/X11/xorg.conf.d/50-touchpad.conf
src: ./lib/etc/X11/xorg.conf.d/50-touchpad.conf src: ./lib/etc/X11/xorg.conf.d/50-touchpad.conf
owner: root owner: root
@ -250,7 +251,7 @@
- name: "X11: Keyboard (GPD Pocket 2)" - name: "X11: Keyboard (GPD Pocket 2)"
when: "'gpd' in ansible_hostname" when: "'gpd' in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/00-keyboard.conf dest: /etc/X11/xorg.conf.d/00-keyboard.conf
src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf.gpdp2 src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf.gpdp2
owner: root owner: root
@ -259,7 +260,7 @@
- name: "X11: Intel Graphics (GPD Pocket 2)" - name: "X11: Intel Graphics (GPD Pocket 2)"
when: "'gpd' in ansible_hostname" when: "'gpd' in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/20-intel.conf dest: /etc/X11/xorg.conf.d/20-intel.conf
src: ./lib/etc/X11/xorg.conf.d/20-intel.conf.gpdp2 src: ./lib/etc/X11/xorg.conf.d/20-intel.conf.gpdp2
owner: root owner: root
@ -268,7 +269,7 @@
- name: "X11: Monitor (GPD Pocket 2)" - name: "X11: Monitor (GPD Pocket 2)"
when: "'gpd' in ansible_hostname" when: "'gpd' in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/30-display.conf dest: /etc/X11/xorg.conf.d/30-display.conf
src: ./lib/etc/X11/xorg.conf.d/30-display.conf.gpdp2 src: ./lib/etc/X11/xorg.conf.d/30-display.conf.gpdp2
owner: root owner: root
@ -277,7 +278,7 @@
- name: "X11: Touchscreen (GPD Pocket 2)" - name: "X11: Touchscreen (GPD Pocket 2)"
when: "'gpd' in ansible_hostname" when: "'gpd' in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/99-touchscreen.conf dest: /etc/X11/xorg.conf.d/99-touchscreen.conf
src: ./lib/etc/X11/xorg.conf.d/99-touchscreen.conf.gpdp2 src: ./lib/etc/X11/xorg.conf.d/99-touchscreen.conf.gpdp2
owner: root owner: root
@ -286,7 +287,7 @@
- name: "X11: Xresources (GPD Pocket 2)" - name: "X11: Xresources (GPD Pocket 2)"
when: "'gpd' in ansible_hostname" when: "'gpd' in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/X11/Xresources dest: /etc/X11/Xresources
src: ./lib/etc/X11/Xresources.gpdp2 src: ./lib/etc/X11/Xresources.gpdp2
owner: root owner: root
@ -297,7 +298,7 @@
## Notbook Specials ## Notbook Specials
- name: "Install Notebook packages" - name: "Install Notebook packages"
when: ansible_facts['form_factor'] == "Notebook" when: ansible_facts['form_factor'] == "Notebook"
package: ansible.builtin.package:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
update_cache: True update_cache: True
@ -306,7 +307,7 @@
- name: "TLP: config" - name: "TLP: config"
when: ansible_facts['form_factor'] == "Notebook" when: ansible_facts['form_factor'] == "Notebook"
copy: ansible.builtin.copy:
dest: /etc/default/tlp dest: /etc/default/tlp
src: ./lib/etc/default/tlp src: ./lib/etc/default/tlp
owner: root owner: root
@ -315,7 +316,7 @@
- name: "TLP: Service" - name: "TLP: Service"
when: ansible_facts['form_factor'] == "Notebook" when: ansible_facts['form_factor'] == "Notebook"
service: ansible.builtin.service:
name: tlp name: tlp
state: started state: started
enabled: yes enabled: yes
@ -323,7 +324,7 @@
## GPD Pocket Specials ## GPD Pocket Specials
- name: "GPD fan module" - name: "GPD fan module"
when: "'gpd' in ansible_hostname" when: "'gpd' in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/modules-load.d/gpd-pocket-fan.conf dest: /etc/modules-load.d/gpd-pocket-fan.conf
owner: root owner: root
group: root group: root
@ -333,7 +334,7 @@
- name: "GPD fan module config" - name: "GPD fan module config"
when: "'gpd' in ansible_hostname" when: "'gpd' in ansible_hostname"
copy: ansible.builtin.copy:
dest: /etc/modprobe.d/gpd-pocket-fan.conf dest: /etc/modprobe.d/gpd-pocket-fan.conf
owner: root owner: root
group: root group: root
@ -342,7 +343,7 @@
options gpd-pocket-fan temp_limits=40000,40001,40002 options gpd-pocket-fan temp_limits=40000,40001,40002
- name: "Set Xbacklight permissions by udev" - name: "Set Xbacklight permissions by udev"
copy: ansible.builtin.copy:
dest: /etc/udev/rules.d/90-backlight.rules dest: /etc/udev/rules.d/90-backlight.rules
owner: root owner: root
group: root group: root

View file

@ -1,35 +1,35 @@
- name: "Install AUR helper and packages" - name: "Install AUR helper"
hosts: localhost hosts: localhost
connection: local connection: local
tasks: tasks:
- name: Create build user - name: Create build user
user: ansible.builtin.user:
name: aur_builder name: aur_builder
group: wheel group: wheel
create_home: no create_home: no
home: /tmp home: /tmp
- name: Install build tools - name: Install build tools
package: ansible.builtin.package:
name: name:
- base-devel - base-devel
state: present state: present
update_cache: True update_cache: True
- name: "Gather package facts" - name: "Gather package facts"
package_facts: ansible.builtin.package_facts:
manager: "auto" manager: "auto"
- name: Install PIKAUR - name: Install PIKAUR
when: "'pikaur' not in ansible_facts['packages']" when: "'pikaur' not in ansible_facts['packages']"
become: yes become: yes
become_user: aur_builder become_user: aur_builder
script: ./lib/installFromAur.sh pikaur ansible.builtin.script: ./lib/installFromAur.sh pikaur
- name: Install ansible-aur-git - name: Install ansible-aur-git
when: "'ansible-aur-git' not in ansible_facts['packages']" when: "'ansible-aur-git' not in ansible_facts['packages']"
become: yes become: yes
become_user: aur_builder become_user: aur_builder
script: ./lib/installFromAur.sh ansible-aur-git ansible.builtin.script: ./lib/installFromAur.sh ansible-aur-git

View file

@ -1,4 +1,4 @@
- name: "Install AUR helper and packages" - name: "Install AUR packages"
hosts: localhost hosts: localhost
connection: local connection: local
@ -8,11 +8,12 @@
become: yes become: yes
become_user: aur_builder become_user: aur_builder
aur: aur:
name: name: '{items}'
- autotiling with_items:
- insync - autotiling
- c-lolcat - insync
- plus42 - c-lolcat
- plus42
- name: Install AUR packages for hyrland - name: Install AUR packages for hyrland
become: yes become: yes