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
- Perform basic systemconfiguration
```
$ git clone https://github.com/elfrinjo/syssetup
$ cd syssetup/dotfiles
$ git clone https://code.elfring.ms/elfrinjo/dotfiles2000
$ cd dotfiles2000/dotfiles
$ stow */
$ cd ../system/arch
$ sudo ansible-playbook baseconfig.yaml
@ -203,8 +203,8 @@ $ sudo wifi-menu
```
- Perform more system configuration
```
$ git clone https://github.com/elfrinjo/dotfiles
$ cd syssetup/dotfiles
$ git clone https://code.elfring.ms/elfrinjo/dotfiles2000
$ cd dotfiles2000/dotfiles
$ stow */
$ cd ../system/arch
$ sudo ansible-playbook workstation.yaml

View file

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

View file

@ -4,153 +4,154 @@
tasks:
- name: "Install workstation packages"
package:
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
- name: "Update pacman cache"
community.general.pacman:
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"
package:
name:
- 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
ansible.builtin.package:
name: '{{ item }}'
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"
package:
name:
- hyprland
- hyprlock
- hypridle
- hyprpicker
- hyprshot
- hyprpaper
- cliphist
- wofi
- waybar
- kitty
- qt6-wayland
- xdg-desktop-portal-hyprland
ansible.builtin.package:
name: '{{ item }}'
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"
package:
ansible.builtin.package:
name: '{{ item }}'
state: absent
update_cache: True
update_cache: False
force: True
with_items:
- jack2
- xf86-input-synaptics
- name: "Install Audio System"
package:
ansible.builtin.package:
name: '{{ item }}'
state: present
update_cache: False
@ -167,12 +168,12 @@
- wireplumber
- name: "Systemd: Disable reboot on ctrl+alt+del"
systemd:
ansible.builtin.systemd:
name: ctrl-alt-del.target
masked: yes
- name: "Systemd: logind.conf"
copy:
ansible.builtin.copy:
dest: /etc/systemd/logind.conf
src: ./lib/etc/systemd/logind.conf
owner: root
@ -180,7 +181,7 @@
mode: 0644
- name: "Lightdm: greeter config"
copy:
ansible.builtin.copy:
dest: /etc/lightdm/lightdm-gtk-greeter.conf
src: ./lib/etc/lightdm/lightdm-gtk-greeter.conf
owner: root
@ -188,7 +189,7 @@
mode: 0644
- name: "Lightdm: config"
copy:
ansible.builtin.copy:
dest: /etc/lightdm/lightdm.conf
src: ./lib/etc/lightdm/lightdm.conf
owner: root
@ -196,7 +197,7 @@
mode: 0644
- name: "Pam: Login"
copy:
ansible.builtin.copy:
dest: /etc/pam.d/login
src: ./lib/etc/pam.d/login
owner: root
@ -204,7 +205,7 @@
mode: 0644
- name: "Pam: Passwd"
copy:
ansible.builtin.copy:
dest: /etc/pam.d/passwd
src: ./lib/etc/pam.d/passwd
owner: root
@ -212,19 +213,19 @@
mode: 0644
- name: "Service: No netctl"
service:
ansible.builtin.service:
name: netctl.service
state: stopped
enabled: no
- name: "Service: NetworkManager"
service:
ansible.builtin.service:
name: NetworkManager.service
state: started
enabled: yes
- name: "Service: lightdm"
service:
ansible.builtin.service:
name: lightdm.service
state: started
enabled: yes
@ -232,7 +233,7 @@
## X11
- name: "X11: Keyboard"
when: "'gpd' not in ansible_hostname"
copy:
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/00-keyboard.conf
src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf
owner: root
@ -241,7 +242,7 @@
- name: "X11: Touchpad"
when: "'gpd' not in ansible_hostname"
copy:
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/50-touchpad.conf
src: ./lib/etc/X11/xorg.conf.d/50-touchpad.conf
owner: root
@ -250,7 +251,7 @@
- name: "X11: Keyboard (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
copy:
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/00-keyboard.conf
src: ./lib/etc/X11/xorg.conf.d/00-keyboard.conf.gpdp2
owner: root
@ -259,7 +260,7 @@
- name: "X11: Intel Graphics (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
copy:
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/20-intel.conf
src: ./lib/etc/X11/xorg.conf.d/20-intel.conf.gpdp2
owner: root
@ -268,7 +269,7 @@
- name: "X11: Monitor (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
copy:
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/30-display.conf
src: ./lib/etc/X11/xorg.conf.d/30-display.conf.gpdp2
owner: root
@ -277,7 +278,7 @@
- name: "X11: Touchscreen (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
copy:
ansible.builtin.copy:
dest: /etc/X11/xorg.conf.d/99-touchscreen.conf
src: ./lib/etc/X11/xorg.conf.d/99-touchscreen.conf.gpdp2
owner: root
@ -286,7 +287,7 @@
- name: "X11: Xresources (GPD Pocket 2)"
when: "'gpd' in ansible_hostname"
copy:
ansible.builtin.copy:
dest: /etc/X11/Xresources
src: ./lib/etc/X11/Xresources.gpdp2
owner: root
@ -297,7 +298,7 @@
## Notbook Specials
- name: "Install Notebook packages"
when: ansible_facts['form_factor'] == "Notebook"
package:
ansible.builtin.package:
name: '{{ item }}'
state: present
update_cache: True
@ -306,7 +307,7 @@
- name: "TLP: config"
when: ansible_facts['form_factor'] == "Notebook"
copy:
ansible.builtin.copy:
dest: /etc/default/tlp
src: ./lib/etc/default/tlp
owner: root
@ -315,7 +316,7 @@
- name: "TLP: Service"
when: ansible_facts['form_factor'] == "Notebook"
service:
ansible.builtin.service:
name: tlp
state: started
enabled: yes
@ -323,7 +324,7 @@
## GPD Pocket Specials
- name: "GPD fan module"
when: "'gpd' in ansible_hostname"
copy:
ansible.builtin.copy:
dest: /etc/modules-load.d/gpd-pocket-fan.conf
owner: root
group: root
@ -333,7 +334,7 @@
- name: "GPD fan module config"
when: "'gpd' in ansible_hostname"
copy:
ansible.builtin.copy:
dest: /etc/modprobe.d/gpd-pocket-fan.conf
owner: root
group: root
@ -342,7 +343,7 @@
options gpd-pocket-fan temp_limits=40000,40001,40002
- name: "Set Xbacklight permissions by udev"
copy:
ansible.builtin.copy:
dest: /etc/udev/rules.d/90-backlight.rules
owner: root
group: root

View file

@ -1,35 +1,35 @@
- name: "Install AUR helper and packages"
- name: "Install AUR helper"
hosts: localhost
connection: local
tasks:
- name: Create build user
user:
ansible.builtin.user:
name: aur_builder
group: wheel
create_home: no
home: /tmp
- name: Install build tools
package:
ansible.builtin.package:
name:
- base-devel
state: present
update_cache: True
- name: "Gather package facts"
package_facts:
ansible.builtin.package_facts:
manager: "auto"
- name: Install PIKAUR
when: "'pikaur' not in ansible_facts['packages']"
become: yes
become_user: aur_builder
script: ./lib/installFromAur.sh pikaur
ansible.builtin.script: ./lib/installFromAur.sh pikaur
- name: Install ansible-aur-git
when: "'ansible-aur-git' not in ansible_facts['packages']"
become: yes
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
connection: local
@ -8,11 +8,12 @@
become: yes
become_user: aur_builder
aur:
name:
- autotiling
- insync
- c-lolcat
- plus42
name: '{items}'
with_items:
- autotiling
- insync
- c-lolcat
- plus42
- name: Install AUR packages for hyrland
become: yes