Trying gnome

This commit is contained in:
2022-05-06 11:18:16 +02:00
parent 393bb5a810
commit 6f9413f54c

View File

@@ -1,57 +1,43 @@
---
- hosts: localhost
vars:
- hostname: 'airsense-dasboards'
- hostname: 'airsense-dashboard'
tasks:
- name: Update and Upgrade all exisiting packages
community.general.pacman:
update_cache: yes
upgrade: yes
- name: Install basic packages
community.general.pacman:
name: sudo,zsh,htop,autoconf,automake,binutils,bison,file,findutils,flex,gawk,gcc,gettext,grep,groff,gzip,libtool,m4,make,patch,pkgconf,sed,texinfo,which,base-devel,ttf-font-awesome
state: present
- name: Make sure we have a 'wheel' group
group:
name: wheel
state: present
- name: Allow 'wheel' to be sudo
lineinfile:
dest: /etc/sudoers
state: present
regexp: '^%wheel'
line: '%wheel ALL=(ALL) ALL'
- name: Add the user tobi
ansible.builtin.user:
name: tobi
password: $6$9OnvBMN6Sxc.muW1$afASAJdoPZL/WxTp6.lh/SurRRiClaru2Pl19fEo6j1aDEQw99kdkfls6.DB8OBacBDnT3bpsLYD3JqrvXlE9/
comment: Tobias Maier
groups: wheel
shell: /bin/zsh
- name: Add the user airsense
ansible.builtin.user:
name: airsense
password: $6$9OnvBMN6Sxc.muW1$afASAJdoPZL/WxTp6.lh/SurRRiClaru2Pl19fEo6j1aDEQw99kdkfls6.DB8OBacBDnT3bpsLYD3JqrvXlE9/
comment: Airsense Dasboard user
comment: Airsense Dashboard User
groups: wheel
shell: /bin/zsh
- name: Create the `aur_builder` user
ansible.builtin.user:
name: aur_builder
create_home: yes
#group: wheel
- name: Allow the `aur_builder` user to run `sudo pacman` without a password
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 paru using makepkg if it isn't installed already
kewlfft.aur.aur:
name: paru
@@ -60,23 +46,17 @@
become: yes
become_method: su
become_user: aur_builder
- name: Install packages from AUR
kewlfft.aur.aur:
use: paru
name: oh-my-zsh-git,zsh-theme-powerlevel10k-git,zsh-autosuggestions,zsh-syntax-highlighting,openssh,reflector
name: oh-my-zsh-git,zsh-theme-powerlevel10k-git,zsh-autosuggestions,zsh-syntax-highlighting,openssh
state: present
become: yes
become_user: aur_builder
- name: Run reflector to update mirrorlist
ansible.builtin.command: reflector --latest 20 --sort rate --save /etc/pacman.d/mirrorlist
- name: Clone dotfiles
ansible.builtin.git:
repo: https://gitea.maiertobi.de/tobimai/dotfiles.git
dest: /tmp/dotfiles
- name: Copy zshrc to home dir
ansible.builtin.copy:
src: //tmp/dotfiles/.zshrc
@@ -84,7 +64,6 @@
owner: tobi
group: tobi
mode: '0644'
- name: Copy p10k to home dir
ansible.builtin.copy:
src: //tmp/dotfiles/.p10k.zsh
@@ -92,59 +71,41 @@
owner: tobi
group: tobi
mode: '0644'
- name: Copy zshrc to home dir
ansible.builtin.copy:
src: //tmp/dotfiles/.zshrc
dest: /home/airsense/.zshrc
owner: tobi
group: tobi
mode: '0644'
- name: Copy p10k to home dir
ansible.builtin.copy:
src: //tmp/dotfiles/.p10k.zsh
dest: /home/airsense/.p10k.zsh
owner: tobi
group: tobi
mode: '0644'
- name: Set a hostname
hostname:
name: "{{ hostname }}"
- name: Install Sway stuff
- name: Install packages from AUR
kewlfft.aur.aur:
use: paru
name: sway,foot,foot-terminfo,waybar,ttf-font-awesome,sway-launcher-desktop,pipewire,pipewire-pulse,bluez,bluez-utils,firefox,archlinux-wallpaper,iwd,btop,light,wob-git,udiskie,ranger,mako,micro,man,wdisplays,swayidle,swaylock-effects-git,pamixer,qt5-wayland,chromium,networkmanager
name: gnome,gnome-extra,orchis-theme-git,python-pip,gnome-shell-extension-dash-to-panel,papirus-icon-theme
state: present
become: yes
become_user: aur_builder
- name: Add WLR_RENDERER_ALLOW_SOFTWARE to /etc/environment, needed for testing in VM
ansible.builtin.lineinfile:
path: /etc/environment
regexp: '^WLR_RENDERER_ALLOW_SOFTWARE='
line: WLR_RENDERER_ALLOW_SOFTWARE=1
- name: Ensures directories exist
ansible.builtin.file:
path: /home/airsense/{{ item }}
state: directory
group: airsense
owner: airsense
mode: '0744'
loop:
- .config/sway
- .config/foot
- name: Copy config files
copy:
src: "{{ playbook_dir }}/{{ item.src }}"
dest: /home/airsense/.config/{{ item.dest }}
remote_src: yes
owner: airsense
group: airsense
with_items:
- { src: 'sway_config', dest: 'sway/config' }
- { src: 'foot.ini', dest: 'foot/foot.ini' }
- name: Enable service gdm
ansible.builtin.service:
name: gdm
enabled: yes
- name: Install psutil python package
pip:
name: psutil
- name: Set Gnome theme
dconf:
key: /org/gnome/desktop/interface/gtk-theme
value: "'Orchis-orange-dark-compact'"
state: present
become: yes
become_user: tobi
- name: Set Gnome icon theme
dconf:
key: /org/gnome/desktop/interface/icon-theme
value: "'Papirus-Dark'"
state: present
become: yes
become_user: tobi
- name: Install some more user-packages
kewlfft.aur.aur:
use: paru
name: chromium
state: present
become: yes
become_user: aur_builder