Compare commits
No commits in common. "master" and "laptop" have entirely different histories.
127 changed files with 481 additions and 2158 deletions
|
@ -3,7 +3,7 @@
|
|||
set -e
|
||||
|
||||
SUDO='sudo'
|
||||
ANSIBLE_REPO='https://git.grondek.dev/pgrondek/ansible-desktop.git'
|
||||
ANSIBLE_REPO='https://git.grondek.pl/pgrondek/ansible-desktop.git'
|
||||
|
||||
if [[ "$EUID" == 0 ]]; then
|
||||
echo "Run script as normal user"
|
||||
|
@ -14,9 +14,9 @@ fi
|
|||
"${SUDO}" apt-add-repository --yes --update ppa:ansible/ansible
|
||||
"${SUDO}" apt install -y git ansible
|
||||
|
||||
if [ ! -d "${HOME}/src/desktop/ansible-desktop" ]; then
|
||||
mkdir -p "${HOME}/src/desktop/"
|
||||
cd "${HOME}/src/desktop/"
|
||||
if [ ! -d "${HOME}/src/ansible-desktop" ]; then
|
||||
mkdir -p "${HOME}/src"
|
||||
cd "${HOME}/src"
|
||||
git clone "$ANSIBLE_REPO"
|
||||
fi
|
||||
cd "${HOME}/src/ansible-desktop"
|
||||
|
|
|
@ -1,37 +1,15 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- prepare
|
||||
- systemd-boot
|
||||
- ubuntu
|
||||
- desktop
|
||||
- lightdm
|
||||
- dwm
|
||||
- dev-java
|
||||
- dev-js
|
||||
- autofs
|
||||
- prusa-slicer
|
||||
- ubuntu
|
||||
- firefox
|
||||
- docker
|
||||
- laptop
|
||||
- backup
|
||||
- gaming
|
||||
- dotfiles
|
||||
- java
|
||||
- jetbrains
|
||||
- signal
|
||||
- virtual
|
||||
|
||||
# - ego
|
||||
# - dev-flutter
|
||||
# - terraform
|
||||
- postinstall
|
||||
vars:
|
||||
desktop_src_dir: "{{ ansible_user_dir }}/src/desktop"
|
||||
arch_src_dir: "{{ ansible_user_dir }}/src/arch"
|
||||
git_repos:
|
||||
ssh:
|
||||
dwm: ssh://git@git.grondek.dev:2222/pgrondek/dwm.git
|
||||
dotfiles: ssh://git@git.grondek.dev:2222/pgrondek/dotfiles.git
|
||||
polybar: ssh://git@git.grondek.dev:2222/pgrondek/polybar-dwm.git
|
||||
st: ssh://git@git.grondek.dev:2222/pgrondek/stterm.git
|
||||
https:
|
||||
dwm: https://git.grondek.dev/pgrondek/dwm.git
|
||||
dotfiles: https://git.grondek.dev/pgrondek/dotfiles.git
|
||||
polybar: https://git.grondek.dev/pgrondek/polybar-dwm.git
|
||||
st: https://git.grondek.dev/pgrondek/stterm.git
|
||||
- lutris
|
||||
- prusa-slicer
|
||||
- laptop
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
/media/bender /etc/autofs/auto.bender --browse
|
|
@ -1,8 +0,0 @@
|
|||
#
|
||||
3D -fstype=cifs,rw,iocharset=utf8,uid=1000,credentials=/etc/samba/credentials,vers=3.1.1 ://bender.lan/3D
|
||||
Documents -fstype=cifs,rw,iocharset=utf8,uid=1000,credentials=/etc/samba/credentials,vers=3.1.1 ://bender.lan/documents
|
||||
Photos -fstype=cifs,rw,iocharset=utf8,uid=1000,credentials=/etc/samba/credentials,vers=3.1.1 ://bender.lan/photos
|
||||
Software -fstype=cifs,rw,iocharset=utf8,uid=1000,credentials=/etc/samba/credentials,vers=3.1.1 ://bender.lan/software
|
||||
|
||||
arch bender.lan:/mnt/MAIN/arch
|
||||
logn bender.lan:/mnt/MAIN/logn
|
|
@ -1,31 +0,0 @@
|
|||
- name: install client packages
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- samba
|
||||
- nfs-utils
|
||||
|
||||
- name: install autofs
|
||||
shell:
|
||||
cmd:
|
||||
yay -S --needed --noconfirm autofs
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: copy bender.autofs
|
||||
become: yes
|
||||
copy:
|
||||
src: etc/auto.master.d/bender.autofs
|
||||
dest: /etc/autofs/auto.master.d/bender.autofs
|
||||
|
||||
- name: copy auto.bender
|
||||
become: yes
|
||||
copy:
|
||||
src: etc/autofs/auto.bender
|
||||
dest: /etc/autofs/auto.bender
|
||||
|
||||
- name: "Enable service"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: autofs
|
||||
state: started
|
||||
enabled: yes
|
|
@ -1,5 +0,0 @@
|
|||
- import_tasks: ubuntu.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: arch.yml
|
||||
when: ansible_distribution == "Archlinux"
|
|
@ -1,25 +0,0 @@
|
|||
- name: install necessary software
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- autofs
|
||||
- cifs-utils
|
||||
- nfs-common
|
||||
|
||||
- name: copy bender.autofs
|
||||
become: yes
|
||||
copy:
|
||||
src: etc/auto.master.d/bender.autofs
|
||||
dest: /etc/auto.master.d/bender.autofs
|
||||
|
||||
- name: create autofs directory
|
||||
file:
|
||||
path: /etc/autofs
|
||||
state: directory
|
||||
|
||||
- name: copy auto.bender
|
||||
become: yes
|
||||
copy:
|
||||
src: etc/autofs/auto.bender
|
||||
dest: /etc/autofs/auto.bender
|
|
@ -1,13 +0,0 @@
|
|||
timestamp_format long
|
||||
|
||||
snapshot_preserve_min 24h
|
||||
snapshot_preserve 7d 4w 3m
|
||||
|
||||
volume /home
|
||||
snapshot_dir /home/.snapshots
|
||||
subvolume /home
|
||||
|
||||
volume /
|
||||
snapshot_dir /.snapshot_dir
|
||||
subvolume /
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec /usr/bin/btrbk -q run
|
|
@ -1,29 +0,0 @@
|
|||
---
|
||||
- name: install btrbk
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- btrfs-progs
|
||||
- btrbk
|
||||
- cronie
|
||||
|
||||
- name: "Enable cron"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: cronie
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: Copy configuration
|
||||
become: yes
|
||||
copy:
|
||||
src: etc/btrbk/btrbk.conf
|
||||
dest: /etc/btrbk/btrbk.conf
|
||||
mode: 0644
|
||||
|
||||
- name: Add cron daily
|
||||
become: yes
|
||||
copy:
|
||||
src: etc/cron.daily/btrbk
|
||||
dest: /etc/cron.daily/btrbk
|
||||
mode: 0755
|
|
@ -1,6 +0,0 @@
|
|||
- name: "[Arch] install deja-dup"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- deja-dup
|
||||
when: ansible_distribution == "Archlinux"
|
|
@ -1,2 +0,0 @@
|
|||
---
|
||||
- import_tasks: deja-dup.yml
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
|
@ -1,56 +0,0 @@
|
|||
---
|
||||
- name: "[Arch] install basic system"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- btrfs-progs
|
||||
- dhcpcd
|
||||
- efibootmgr
|
||||
- helvum
|
||||
|
||||
- name: "[Arch] install terminal packages"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- bash-completion
|
||||
- bind
|
||||
- graphviz
|
||||
- htop
|
||||
- imagemagick
|
||||
- less
|
||||
- net-tools
|
||||
- neofetch
|
||||
- screen
|
||||
- tmux
|
||||
- traceroute
|
||||
- vim
|
||||
|
||||
- name: "[Arch] install terminal packages"
|
||||
shell:
|
||||
cmd:
|
||||
yay -S --needed --noconfirm pm-utils
|
||||
|
||||
- name: "[Arch] install gui packages"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- file-roller
|
||||
- flameshot
|
||||
- gnome-backgrounds
|
||||
- gnome-text-editor
|
||||
- gnome-themes-extra
|
||||
- gvfs-smb
|
||||
- gsimplecal
|
||||
- libreoffice-still
|
||||
- nautilus
|
||||
- openscad
|
||||
- thunderbird
|
||||
|
||||
- name: "[Arch] copy scripts"
|
||||
become: yes
|
||||
copy:
|
||||
src: "usr/local/sbin/{{item}}"
|
||||
dest: "/usr/local/sbin/{{item}}"
|
||||
mode: '0755'
|
||||
loop:
|
||||
- update-grub
|
|
@ -1,13 +0,0 @@
|
|||
- name: "[Arch] install audio"
|
||||
when: ansible_distribution == "Archlinux"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- playerctl
|
||||
- helvum
|
||||
- pavucontrol
|
||||
- pasystray
|
||||
- pipewire
|
||||
- pipewire-alsa
|
||||
- pipewire-pulse
|
||||
- wireplumber
|
|
@ -1,15 +0,0 @@
|
|||
- name: "[Arch] install bluetooth"
|
||||
when: ansible_distribution == "Archlinux"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- blueman
|
||||
- bluez
|
||||
- bluez-utils
|
||||
|
||||
- name: "[All] Enable service"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: bluetooth
|
||||
state: started
|
||||
enabled: yes
|
|
@ -1,17 +0,0 @@
|
|||
- name: "[Arch] install chromium"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- chromium
|
||||
|
||||
- name: "[Arch] install firefox"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- firefox
|
||||
|
||||
- name: "[Arch] install Zen browser"
|
||||
shell:
|
||||
cmd:
|
||||
yay -S --needed --noconfirm zen-browser-bin
|
||||
when: ansible_distribution == "Archlinux"
|
|
@ -1,14 +0,0 @@
|
|||
- name: "[Arch] Install cron"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- cronie
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: "[Arch] Enable cron service"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: cronie
|
||||
state: started
|
||||
enabled: yes
|
||||
when: ansible_distribution == "Archlinux"
|
|
@ -1,20 +0,0 @@
|
|||
- name: "[Arch] cups"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- cups
|
||||
- system-config-printer
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: "[Arch] install drivers for epson printer"
|
||||
shell:
|
||||
cmd:
|
||||
yay -S --needed --noconfirm epson-inkjet-printer-escpr
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: "[All] Enable service"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: cups
|
||||
state: started
|
||||
enabled: yes
|
|
@ -1,16 +0,0 @@
|
|||
- name: checkout dotfiles
|
||||
git:
|
||||
repo: "{{ git.dotfiles }}"
|
||||
dest: "{{ desktop_src_dir }}/dotfiles"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: create bin dir
|
||||
file:
|
||||
path: ~/bin
|
||||
state: directory
|
||||
|
||||
- name: install
|
||||
make:
|
||||
target: install
|
||||
chdir: "{{ desktop_src_dir }}/dotfiles"
|
|
@ -1,5 +0,0 @@
|
|||
- name: "[Arch] install dymo cups driver"
|
||||
shell:
|
||||
cmd:
|
||||
yay -S --needed --noconfirm dymo-cups-drivers
|
||||
when: ansible_distribution == "Archlinux"
|
|
@ -1,34 +0,0 @@
|
|||
- name: "[Arch] install flatpak"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- flatpak
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: "[Ubuntu] install package managers"
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- flatpak
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: "[All] install the smile emoji picker"
|
||||
community.general.flatpak:
|
||||
state: present
|
||||
name: it.mijorus.smile
|
||||
|
||||
- name: "[All] install bottles"
|
||||
community.general.flatpak:
|
||||
state: present
|
||||
name: com.usebottles.bottles
|
||||
|
||||
- name: "[All] install Element"
|
||||
community.general.flatpak:
|
||||
state: present
|
||||
name: im.riot.Riot
|
||||
|
||||
- name: "[All] install Parsec"
|
||||
community.general.flatpak:
|
||||
state: present
|
||||
name: com.parsecgaming.parsec
|
|
@ -1,10 +0,0 @@
|
|||
- name: "[Arch] Install fonts"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- ttf-dejavu
|
||||
- ttf-fira-code
|
||||
- ttf-font-awesome
|
||||
- ttf-liberation
|
||||
- ttf-ubuntu-font-family
|
||||
when: ansible_distribution == "Archlinux"
|
|
@ -1,6 +0,0 @@
|
|||
- name: "[Arch] install gparted packages"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- gparted
|
||||
- dosfstools
|
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
- import_tasks: ubuntu.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: arch.yml
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- import_tasks: flatpaks.yml
|
||||
|
||||
- import_tasks: audio.yml
|
||||
|
||||
- import_tasks: bluetooth.yml
|
||||
|
||||
- import_tasks: browsers.yml
|
||||
|
||||
- import_tasks: cron.yml
|
||||
|
||||
- import_tasks: cups.yml
|
||||
|
||||
- import_tasks: dotfiles.yml
|
||||
|
||||
- import_tasks: fonts.yml
|
||||
|
||||
- import_tasks: gparted.yml
|
||||
|
||||
- import_tasks: network-manager.yml
|
||||
|
||||
- import_tasks: nextcloud.yml
|
||||
|
||||
- import_tasks: signal.yml
|
||||
|
||||
- import_tasks: timekpr.yml
|
||||
|
||||
- import_tasks: xorg.yml
|
|
@ -1,15 +0,0 @@
|
|||
- name: "[Arch] install nm packages"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- networkmanager
|
||||
- network-manager-applet
|
||||
- nm-connection-editor
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: "[All] Enable network manager"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: NetworkManager.service
|
||||
state: started
|
||||
enabled: yes
|
|
@ -1,7 +0,0 @@
|
|||
- name: "[Arch] install nextcloud client"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- nextcloud-client
|
||||
- gnome-keyring
|
||||
when: ansible_distribution == "Archlinux"
|
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
- become: yes
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
block:
|
||||
- name: "[Ubuntu] add signal gpg key"
|
||||
apt_key:
|
||||
url: https://updates.signal.org/desktop/apt/keys.asc
|
||||
state: present
|
||||
|
||||
- name: "[Ubuntu] add signal repo"
|
||||
apt_repository:
|
||||
repo: deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main
|
||||
state: present
|
||||
filename: signal-xenial
|
||||
|
||||
- name: "[Ubuntu] install signal-desktop"
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- signal-desktop
|
||||
|
||||
- name: "[Arch] install signal-desktop"
|
||||
when: ansible_distribution == "Archlinux"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
update_cache: yes
|
||||
name: signal-desktop
|
|
@ -1,6 +0,0 @@
|
|||
- name: "[Arch] install terraform"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- terraform
|
||||
when: ansible_distribution == "Archlinux"
|
|
@ -1,35 +0,0 @@
|
|||
- become: yes
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
block:
|
||||
- name: "[Ubuntu] add ppa"
|
||||
apt_repository:
|
||||
repo: ppa:mjasnik/ppa
|
||||
|
||||
- name: "[Ubuntu] install timekpr"
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: latest
|
||||
pkg:
|
||||
- timekpr-next
|
||||
|
||||
- name: "[Arch] install timekpr"
|
||||
shell:
|
||||
cmd:
|
||||
yay -S --needed --noconfirm timekpr-next
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- become: yes
|
||||
block:
|
||||
- name: "[All] configure"
|
||||
template:
|
||||
src: var/lib/timekpr/config/timekpr.USER.conf.j2
|
||||
dest: /var/lib/timekpr/config/timekpr.{{ansible_user_id}}.conf
|
||||
vars:
|
||||
user: "{{ ansible_user_id }}"
|
||||
|
||||
- name: "[All] Enable service"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: timekpr
|
||||
state: started
|
||||
enabled: yes
|
|
@ -1,15 +0,0 @@
|
|||
- name: "[Arch] install xorg tools"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- autorandr
|
||||
- brightnessctl
|
||||
- numlockx
|
||||
- picom
|
||||
- polkit-gnome
|
||||
- redshift
|
||||
- xdotool
|
||||
- xdg-desktop-portal-gtk
|
||||
- xorg-xinit
|
||||
- xorg-xkill
|
||||
- xorg-xwininfo
|
|
@ -1,51 +0,0 @@
|
|||
[DOCUMENTATION]
|
||||
#### this is the user configuration file for timekpr-next
|
||||
#### if this file cannot be read properly, it will be overwritten with defaults
|
||||
#### all numeric time values are specified in seconds
|
||||
#### days and hours should be configured as per ISO 8601 (i.e. Monday is the first day of week (1-7) and hours are in 24h format (0-23))
|
||||
|
||||
[{{ user }}]
|
||||
# this defines which hours are allowed (remove or add hours to limit access), configure limits for start/end minutes for hour in brackets,
|
||||
# optionally enter ! in front of hour to mark it non-accountable, example: !22[00-15]
|
||||
ALLOWED_HOURS_1 = 9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
|
||||
ALLOWED_HOURS_2 = 9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
|
||||
ALLOWED_HOURS_3 = 9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
|
||||
ALLOWED_HOURS_4 = 9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
|
||||
ALLOWED_HOURS_5 = 9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
|
||||
ALLOWED_HOURS_6 = 0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
|
||||
ALLOWED_HOURS_7 = 0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23
|
||||
# this defines which days of the week a user can use computer (remove or add days to limit access)
|
||||
ALLOWED_WEEKDAYS = 1;2;3;4;5;6;7
|
||||
# this defines allowed time in seconds per week day a user can use the computer (number of values must match the number of values for option ALLOWED_WEEKDAYS)
|
||||
LIMITS_PER_WEEKDAYS = 86400;86400;86400;86400;86400;86400;86400
|
||||
# this defines allowed time per week in seconds (in addition to other limits)
|
||||
LIMIT_PER_WEEK = 604800
|
||||
# this defines allowed time per month in seconds (in addition to other limits)
|
||||
LIMIT_PER_MONTH = 2678400
|
||||
# this defines whether to account sessions which are inactive (locked screen, user switched away from desktop, etc.)
|
||||
TRACK_INACTIVE = False
|
||||
# this defines whether to show icon and notifications for user
|
||||
HIDE_TRAY_ICON = False
|
||||
# this defines user restriction / lockout mode: lock - lock screen, suspend - put computer to sleep, suspendwake - put computer to sleep and wake it up,
|
||||
# terminate - terminate sessions, shutdown - shutdown the computer
|
||||
LOCKOUT_TYPE = terminate
|
||||
# this defines wakeup hour interval in format xn;yn where xn / yn are hours from 0 to 23, wakeup itself must be supported by BIOS / UEFI and enabled,
|
||||
# this is effective only when lockout type is suspendwake
|
||||
WAKEUP_HOUR_INTERVAL = 0;23
|
||||
|
||||
[{{ user }}.PLAYTIME]
|
||||
# whether PlayTime is enabled for this user
|
||||
PLAYTIME_ENABLED = False
|
||||
# whether PlayTime is enabled to override existing time accounting, i.e. time ticks only when PlayTime processes / activities are running,
|
||||
# in this case explicit PlayTime limits are ignored
|
||||
PLAYTIME_LIMIT_OVERRIDE_ENABLED = False
|
||||
# whether PlayTime activities are allowed during unaccounted time intervals
|
||||
PLAYTIME_UNACCOUNTED_INTERVALS_ENABLED = True
|
||||
# specify on which days PlayTime is enabled
|
||||
PLAYTIME_ALLOWED_WEEKDAYS = 1;2;3;4;5;6;7
|
||||
# how much PlayTime is allowed per allowed days (number of values must match the number of values for option PLAYTIME_ALLOWED_WEEKDAYS)
|
||||
PLAYTIME_LIMITS_PER_WEEKDAYS = 0;0;0;0;0;0;0
|
||||
# this defines which activities / processes are monitored, pattern: PLAYTIME_ACTIVITY_NNN = PROCESS_MASK[DESCRIPTION],
|
||||
# where NNN is number left padded with 0 (keys must be unique and ordered), optionally it's possible to add user
|
||||
# friendly description in [] brackets. Process mask supports regexp, except symbols [], please be careful entering it!
|
||||
##PLAYTIME_ACTIVITIES## Do NOT remove or alter this line!
|
|
@ -1,62 +0,0 @@
|
|||
- name: create android-sdk directory
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ android.dir }}"
|
||||
state: directory
|
||||
owner: "{{ ansible_user_id }}"
|
||||
|
||||
- name: Create temp dir
|
||||
file:
|
||||
path: "{{ tmp_dir }}"
|
||||
state: directory
|
||||
|
||||
- name: "Download Android studio"
|
||||
unarchive:
|
||||
src: "https://dl.google.com/android/repository/commandlinetools-linux-{{ android.commandlinetools.version }}.zip"
|
||||
dest: "{{ tmp_dir }}"
|
||||
remote_src: yes
|
||||
|
||||
- name: get folder name
|
||||
shell: ls "{{ tmp_dir }}"
|
||||
register: dir_name
|
||||
|
||||
- name: create android-sdk cmdline-tools directory
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ android.dir }}/cmdline-tools"
|
||||
state: directory
|
||||
owner: "{{ ansible_user_id }}"
|
||||
|
||||
- name: Copy to final directory
|
||||
command: "cp -ra {{ tmp_dir }}/{{ dir_name.stdout }} {{ android.dir }}/cmdline-tools/latest"
|
||||
|
||||
- name: Remove temp directory
|
||||
file:
|
||||
path: "{{ tmp_dir }}"
|
||||
state: absent
|
||||
|
||||
- name: Create symbolic link for sdkmanager
|
||||
become: yes
|
||||
file:
|
||||
src: "{{ android.dir }}/cmdline-tools/latest/bin/sdkmanager"
|
||||
dest: "/usr/local/bin/sdkmanager"
|
||||
state: link
|
||||
|
||||
- name: Create symbolic link for avdmanager
|
||||
become: yes
|
||||
file:
|
||||
src: "{{ android.dir }}/cmdline-tools/latest/bin/avdmanager"
|
||||
dest: "/usr/local/bin/avdmanager"
|
||||
state: link
|
||||
|
||||
- name: Install SDK
|
||||
shell:
|
||||
cmd: |
|
||||
yes | sdkmanager --licenses
|
||||
sdkmanager --install "build-tools;{{ android.sdk.buildtools.version }}"
|
||||
sdkmanager --install "emulator"
|
||||
sdkmanager --install "patcher;v4"
|
||||
sdkmanager --install "platform-tools"
|
||||
sdkmanager --install "platforms;android-{{ android.sdk.version }}"
|
||||
sdkmanager --install "sources;android-{{ android.sdk.version }}"
|
||||
sdkmanager --install "system-images;android-{{ android.sdk.version }};google_apis;x86_64"
|
|
@ -1,43 +0,0 @@
|
|||
- name: Create temp dir
|
||||
file:
|
||||
path: "{{ tmp_dir }}"
|
||||
state: directory
|
||||
|
||||
- name: "Install Flutter"
|
||||
become: yes
|
||||
unarchive:
|
||||
src: "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_{{ flutter.version }}-stable.tar.xz"
|
||||
dest: "{{ tmp_dir }}"
|
||||
remote_src: yes
|
||||
|
||||
- name: get folder name
|
||||
shell: ls "{{ tmp_dir }}"
|
||||
register: dir_name
|
||||
|
||||
- name: Copy to final directory
|
||||
become: yes
|
||||
command: "cp -ra {{ tmp_dir }}/{{ dir_name.stdout }} {{ flutter.dir }}"
|
||||
|
||||
- name: Remove temp directory
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ tmp_dir }}"
|
||||
state: absent
|
||||
|
||||
- name: Create symbolic link for flutter
|
||||
become: yes
|
||||
file:
|
||||
src: "{{ flutter.dir }}/bin/flutter"
|
||||
dest: "/usr/local/bin/flutter"
|
||||
state: link
|
||||
|
||||
- name: Create symbolic link for dart
|
||||
become: yes
|
||||
file:
|
||||
src: "{{ flutter.dir }}/bin/dart"
|
||||
dest: "/usr/local/bin/dart"
|
||||
state: link
|
||||
|
||||
- name: Set flutter android sdk dir
|
||||
shell:
|
||||
cmd: flutter config --android-sdk {{ android.dir }}
|
|
@ -1,18 +0,0 @@
|
|||
- name: Check if android-sdk has been installed
|
||||
stat:
|
||||
path: "{{ android.dir }}"
|
||||
register: android_sdk_dir_status
|
||||
|
||||
- import_tasks: install-android-sdk.yml
|
||||
when:
|
||||
- not android_sdk_dir_status.stat.exists
|
||||
|
||||
- name: Check if flutter has been installed
|
||||
stat:
|
||||
path: "{{ flutter.dir }}"
|
||||
register: flutter_dir_status
|
||||
|
||||
- import_tasks: install-flutter.yml
|
||||
when:
|
||||
- not flutter_dir_status.stat.exists
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
tmp_dir: /tmp/flutter
|
||||
flutter:
|
||||
dir: /opt/flutter
|
||||
version: 3.13.0
|
||||
android:
|
||||
dir: /opt/android-sdk
|
||||
sdk:
|
||||
version: 33
|
||||
buildtools:
|
||||
version: 30.0.3
|
||||
commandlinetools:
|
||||
version: 10406996_latest
|
|
@ -1,36 +0,0 @@
|
|||
- name: "[Arch] install java"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- jdk17-openjdk
|
||||
|
||||
- name: "[Arch] Download IntelliJ"
|
||||
shell:
|
||||
cmd:
|
||||
yay -Sw --needed --noconfirm intellij-idea-ultimate-edition
|
||||
|
||||
- name: "[Arch] Build IntelliJ"
|
||||
shell:
|
||||
chdir: "{{ ansible_user_dir }}/.cache/yay/intellij-idea-ultimate-edition"
|
||||
cmd:
|
||||
makepkg --noconfirm || true
|
||||
|
||||
- name: "[Arch] Query version"
|
||||
shell:
|
||||
cmd:
|
||||
yay -Ss intellij-idea-ultimate-edition | head -1 | awk '{print $2}'
|
||||
register: version
|
||||
|
||||
- name: "[Arch] Install IntelliJ"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- "{{ ansible_user_dir }}/.cache/yay/intellij-idea-ultimate-edition/intellij-idea-ultimate-edition-{{ version.stdout }}-x86_64.pkg.tar.zst"
|
||||
- "{{ ansible_user_dir }}/.cache/yay/intellij-idea-ultimate-edition/intellij-idea-ultimate-edition-jre-{{ version.stdout }}-x86_64.pkg.tar.zst"
|
||||
|
||||
- name: "[Arch] Create symbolic link"
|
||||
become: yes
|
||||
file:
|
||||
src: "/usr/bin/intellij-idea-ultimate-edition"
|
||||
dest: "/usr/bin/idea"
|
||||
state: link
|
|
@ -1,49 +0,0 @@
|
|||
- name: "Get IntelliJ version"
|
||||
uri:
|
||||
url: https://data.services.jetbrains.com/products/releases?code=IIU
|
||||
body_format: json
|
||||
register: idea_info
|
||||
|
||||
- name: Create temp dir
|
||||
file:
|
||||
path: "{{ tmp_dir }}"
|
||||
state: directory
|
||||
|
||||
- name: "Download IntelliJ Ultimate"
|
||||
become: yes
|
||||
unarchive:
|
||||
src: "{{ idea_info.json | json_query('IIU[0].downloads.linux.link') }}"
|
||||
dest: "{{ tmp_dir }}"
|
||||
remote_src: yes
|
||||
|
||||
- name: get folder name
|
||||
shell: ls "{{ tmp_dir }}"
|
||||
register: dir_name
|
||||
|
||||
- name: Check if old version exists
|
||||
stat:
|
||||
path: "{{idea_dir}}"
|
||||
register: intellij_dir
|
||||
|
||||
- name: Move old version if available
|
||||
become: yes
|
||||
command: mv {{idea_dir}} {{idea_dir}}-{{local_intellij_version}}
|
||||
when:
|
||||
- intellij_dir.stat.exists
|
||||
|
||||
- name: Copy to final directory
|
||||
become: yes
|
||||
command: "cp -ra {{ tmp_dir }}/{{ dir_name.stdout }} {{ idea_dir }}"
|
||||
|
||||
- name: Remove temp directory
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ tmp_dir }}"
|
||||
state: absent
|
||||
|
||||
- name: Create symbolic link
|
||||
become: yes
|
||||
file:
|
||||
src: "/opt/idea/bin/idea.sh"
|
||||
dest: "/usr/local/bin/idea"
|
||||
state: link
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
- import_tasks: ubuntu.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: arch.yml
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- import_tasks: system-setup.yml
|
|
@ -1,33 +0,0 @@
|
|||
- name: "Get IntelliJ version"
|
||||
uri:
|
||||
url: https://data.services.jetbrains.com/products/releases?code=IIU
|
||||
body_format: json
|
||||
register: idea_info
|
||||
|
||||
- name: "Check if intellij is installed"
|
||||
stat:
|
||||
path: "{{idea_dir}}/product-info.json"
|
||||
register: local_version_info_file
|
||||
|
||||
- name: "Check installed version"
|
||||
when:
|
||||
- local_version_info_file.stat.exists
|
||||
shell: cat {{idea_dir}}/product-info.json
|
||||
register: local_version_info_file
|
||||
|
||||
- name: "Set version info fact"
|
||||
set_fact:
|
||||
local_intellij_version: "{{ local_version_info_file.stdout | from_json | json_query('version') }}"
|
||||
upstream_intellij_version: "{{ idea_info.json | json_query('IIU[0].version') }}"
|
||||
when:
|
||||
local_version_inf_file is defined
|
||||
|
||||
- name: "Set version info fact"
|
||||
set_fact:
|
||||
local_intellij_version: "0.0"
|
||||
upstream_intellij_version: "{{ idea_info.json | json_query('IIU[0].version') }}"
|
||||
when:
|
||||
local_version_inf_file is undefined
|
||||
|
||||
- import_tasks: install.yml
|
||||
when: local_version_info_file is undefined or local_intellij_version != upstream_intellij_version
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
tmp_dir: /tmp/idea
|
||||
idea_dir: /opt/idea
|
|
@ -1,7 +0,0 @@
|
|||
- name: "[Arch] install nodejs"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- nodejs
|
||||
- npm
|
||||
when: ansible_distribution == "Archlinux"
|
|
@ -1,21 +0,0 @@
|
|||
- name: install docker
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
update_cache: yes
|
||||
name:
|
||||
- docker
|
||||
- docker-compose
|
||||
|
||||
- name: "Enable service"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: docker
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: add current user to docker group
|
||||
become: yes
|
||||
user:
|
||||
name: "{{ ansible_user_id }}"
|
||||
append: yes
|
||||
groups: docker
|
|
@ -1,7 +1,4 @@
|
|||
---
|
||||
- import_tasks: install-ubuntu.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: install-arch.yml
|
||||
when: ansible_distribution == "Archlinux"
|
||||
- import_tasks: install-docker-io.yml
|
||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "18.04"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
docker:
|
||||
compose:
|
||||
version: v2.17.3
|
||||
version: 1.26.0
|
||||
|
|
24
roles/dotfiles/tasks/main.yml
Normal file
24
roles/dotfiles/tasks/main.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
- name: install required packages
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- git
|
||||
- make
|
||||
|
||||
- name: create src dir
|
||||
file:
|
||||
path: ~/src
|
||||
|
||||
- name: checkout dotfiles
|
||||
git:
|
||||
repo: "{{ dotfiles.repo }}"
|
||||
dest: "{{ ansible_user_dir }}/src/dotfiles"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: install
|
||||
make:
|
||||
target: install
|
||||
chdir: "{{ ansible_user_dir }}/src/dotfiles"
|
3
roles/dotfiles/vars/main.yml
Normal file
3
roles/dotfiles/vars/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dotfiles:
|
||||
repo: https://github.com/pgrondek/dotfiles.git
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
export GTK_THEME='Yaru-blue-dark'
|
||||
|
||||
dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
|
||||
if type "xrandr"; then
|
||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||
MONITOR=$m polybar --reload dwm &
|
||||
done
|
||||
else
|
||||
polybar --reload dwm &
|
||||
fi
|
|
@ -4,6 +4,8 @@
|
|||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- git
|
||||
- make
|
||||
- build-essential
|
||||
- gcc
|
||||
- libx11-dev
|
||||
|
@ -11,38 +13,21 @@
|
|||
- libxinerama-dev
|
||||
- libxcb-res0-dev
|
||||
- libx11-xcb-dev
|
||||
- libyajl-dev
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: install required packages for dwm
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- gcc
|
||||
- base-devel
|
||||
- libx11
|
||||
- libxft
|
||||
- libxinerama
|
||||
- libxcb
|
||||
- yajl
|
||||
when: ansible_distribution == "Archlinux"
|
||||
- name: create src dir
|
||||
file:
|
||||
path: ~/src
|
||||
|
||||
- name: checkout dwm
|
||||
git:
|
||||
repo: "{{ git.dwm }}"
|
||||
dest: "{{ desktop_src_dir }}/dwm"
|
||||
repo: "{{ dwm.repo }}"
|
||||
dest: "{{ ansible_user_dir }}/src/dwm"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: build dwm
|
||||
make:
|
||||
chdir: "{{ desktop_src_dir }}/dwm"
|
||||
|
||||
- name: ensure that xsessions directory exists
|
||||
become: yes
|
||||
file:
|
||||
path: /usr/share/xsessions
|
||||
state: directory
|
||||
chdir: "{{ ansible_user_dir }}/src/dwm"
|
||||
|
||||
- name: copy xsession
|
||||
become: yes
|
||||
|
@ -67,5 +52,8 @@
|
|||
become: yes
|
||||
register: make
|
||||
make:
|
||||
chdir: "{{ desktop_src_dir }}/dwm"
|
||||
chdir: "{{ ansible_user_dir }}/src/dwm"
|
||||
target: install
|
||||
|
||||
- name: debug
|
||||
debug: msg="{{ make.stdout }}"
|
||||
|
|
33
roles/dwm/tasks/dwmstatus.yml
Normal file
33
roles/dwm/tasks/dwmstatus.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
- name: install required packages for dwmstatus
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- git
|
||||
- make
|
||||
|
||||
- name: create src dir
|
||||
file:
|
||||
path: ~/src
|
||||
|
||||
- name: checkout dwmstatus
|
||||
git:
|
||||
repo: "{{ dwmstatus.repo }}"
|
||||
dest: "{{ ansible_user_dir }}/src/dwmstatus"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: build dwmstatus
|
||||
make:
|
||||
chdir: "{{ ansible_user_dir }}/src/dwmstatus"
|
||||
|
||||
- name: install dwmstatus
|
||||
become: yes
|
||||
register: make
|
||||
make:
|
||||
chdir: "{{ ansible_user_dir }}/src/dwmstatus"
|
||||
target: install
|
||||
|
||||
- name: debug
|
||||
debug: msg="{{ make.stdout }}"
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
- import_tasks: st-term.yml
|
||||
|
||||
- import_tasks: polybar.yml
|
||||
- import_tasks: dwmstatus.yml
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
---
|
||||
- name: "polybar: install required packages"
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- cmake
|
||||
- libcairo2-dev
|
||||
- libcurl4-openssl-dev
|
||||
- libiw-dev
|
||||
- libxcb-composite0-dev
|
||||
- libxcb-randr0-dev
|
||||
- xcb-proto
|
||||
- libxcb-icccm4-dev
|
||||
- libxcb-ewmh-dev
|
||||
- libxcb-util-dev
|
||||
- libxcb-image0-dev
|
||||
- python3-xcbgen
|
||||
- python3-sphinx
|
||||
- libjsoncpp-dev
|
||||
- libuv1-dev
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: "polybar: install required packages"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- cmake
|
||||
- cairo
|
||||
- dbus-python
|
||||
- libcurl-compat
|
||||
- libxcb
|
||||
- xcb-proto
|
||||
- xcb-util-cursor
|
||||
- xcb-util-image
|
||||
- xcb-util-wm
|
||||
- python-sphinx
|
||||
- jsoncpp
|
||||
- libuv
|
||||
- alsa-lib
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: "polybar: create src dir"
|
||||
file:
|
||||
path: "{{ desktop_src_dir }}"
|
||||
|
||||
- name: "polybar: checkout"
|
||||
git:
|
||||
repo: "{{ git.polybar }}"
|
||||
dest: "{{ desktop_src_dir }}/polybar"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: Clean build directory
|
||||
file:
|
||||
path: "{{ desktop_src_dir }}/polybar/build"
|
||||
state: absent
|
||||
|
||||
- name: "polybar: create directory for build"
|
||||
file:
|
||||
state: directory
|
||||
path: "{{ desktop_src_dir }}/polybar/build"
|
||||
|
||||
- name: "polybar: run cmake"
|
||||
shell:
|
||||
cmd: "cmake ../"
|
||||
chdir: "{{ desktop_src_dir }}/polybar/build"
|
||||
|
||||
- name: "polybar: build"
|
||||
make:
|
||||
chdir: "{{ desktop_src_dir }}/polybar/build"
|
||||
params:
|
||||
NUM_THREADS: "{{ ansible_processor_vcpus }}"
|
||||
|
||||
- name: "polybar: install"
|
||||
become: yes
|
||||
make:
|
||||
chdir: "{{ desktop_src_dir }}/polybar/build"
|
||||
target: install
|
||||
|
||||
- name: "polybar: copy run script"
|
||||
become: yes
|
||||
copy:
|
||||
src: usr/local/bin/launch-polybar
|
||||
dest: /usr/local/bin/launch-polybar
|
||||
mode: '0755'
|
|
@ -9,41 +9,4 @@
|
|||
- feh
|
||||
- dunst
|
||||
- arandr
|
||||
- fonts-font-awesome
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: install necessary software
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- i3lock
|
||||
- dmenu
|
||||
- feh
|
||||
- dunst
|
||||
- arandr
|
||||
- ttf-font-awesome
|
||||
- xss-lock
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: override dmenu_run
|
||||
become: yes
|
||||
copy:
|
||||
src: usr/bin/dmenu_run
|
||||
dest: /usr/bin/dmenu_run
|
||||
mode: '0755'
|
||||
|
||||
- name: install necessary software
|
||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "23.04"
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- libxapp1
|
||||
|
||||
- name: install necessary software
|
||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "23.04"
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- xapp
|
||||
|
|
|
@ -1,44 +1,35 @@
|
|||
---
|
||||
- name: install required packages for st [Ubuntu]
|
||||
- name: install required packages for st
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- git
|
||||
- make
|
||||
- fonts-firacode
|
||||
- fonts-symbola
|
||||
- libharfbuzz-dev
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: install required packages for st [Arch]
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- ttf-fira-code
|
||||
- harfbuzz
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: install required packages for st [AUR]
|
||||
shell:
|
||||
cmd:
|
||||
yay -S --needed --noconfirm ttf-symbola
|
||||
when: ansible_distribution == "Archlinux"
|
||||
- name: create src dir
|
||||
file:
|
||||
path: ~/src
|
||||
|
||||
- name: checkout st
|
||||
git:
|
||||
repo: "{{ git.st }}"
|
||||
dest: "{{ desktop_src_dir }}/stterm"
|
||||
repo: "{{ st.repo }}"
|
||||
dest: "{{ ansible_user_dir }}/src/stterm"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: build st
|
||||
make:
|
||||
chdir: "{{ desktop_src_dir }}/stterm"
|
||||
chdir: "{{ ansible_user_dir }}/src/stterm"
|
||||
|
||||
- name: install st
|
||||
become: yes
|
||||
register: make
|
||||
make:
|
||||
chdir: "{{ desktop_src_dir }}/stterm"
|
||||
chdir: "{{ ansible_user_dir }}/src/stterm"
|
||||
target: install
|
||||
|
||||
- name: debug
|
||||
|
|
7
roles/dwm/vars/main.yml
Normal file
7
roles/dwm/vars/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
dwm:
|
||||
repo: https://github.com/pgrondek/dwm.git
|
||||
st:
|
||||
repo: https://github.com/pgrondek/stterm.git
|
||||
dwmstatus:
|
||||
repo: https://git.grondek.pl/pgrondek/dwmstatus.git
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
- import_tasks: ubuntu.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
---
|
||||
- name: install required packages for dwm
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- rust-all
|
||||
- cargo
|
||||
- libacl1-dev
|
||||
- x11-xserver-utils
|
||||
- xdg-desktop-portal-gtk
|
||||
|
||||
- name: create src dir
|
||||
file:
|
||||
path: ~/src
|
||||
state: directory
|
||||
|
||||
- name: checkout ego
|
||||
git:
|
||||
repo: "{{ ego.repo }}"
|
||||
dest: "{{ desktop_src_dir }}/ego"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: build ego
|
||||
command: cargo install ego
|
||||
args:
|
||||
chdir: "{{ desktop_src_dir }}/ego"
|
||||
|
||||
- name: copy ego
|
||||
become: yes
|
||||
copy:
|
||||
remote_src: true
|
||||
src: "{{ desktop_src_dir }}/.cargo/bin/ego"
|
||||
dest: /usr/local/bin/ego
|
||||
mode: '0755'
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
ego:
|
||||
repo: https://github.com/intgr/ego.git
|
8
roles/firefox/tasks/main.yml
Normal file
8
roles/firefox/tasks/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- import_tasks: upstream.yml
|
||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "22.04"
|
||||
|
||||
- import_tasks: ppa.yml
|
||||
when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "22.04"
|
||||
|
||||
- import_tasks: update-alternatives.yml
|
56
roles/firefox/tasks/ppa.yml
Normal file
56
roles/firefox/tasks/ppa.yml
Normal file
|
@ -0,0 +1,56 @@
|
|||
- become: yes
|
||||
block:
|
||||
- name: Gather the package facts
|
||||
ansible.builtin.package_facts:
|
||||
manager: auto
|
||||
|
||||
- name: Print the package facts
|
||||
ansible.builtin.debug:
|
||||
var: ansible_facts.packages
|
||||
|
||||
- name: remove snap
|
||||
community.general.snap:
|
||||
name: firefox
|
||||
state: absent
|
||||
when:
|
||||
- "'firefox' in ansible_facts.packages"
|
||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
||||
|
||||
- name: remove snap
|
||||
community.general.snap:
|
||||
name: firefox
|
||||
state: disabled
|
||||
when:
|
||||
- "'firefox' in ansible_facts.packages"
|
||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
||||
|
||||
- name: remove apt snap wrapper version
|
||||
apt:
|
||||
state: absent
|
||||
pkg:
|
||||
- firefox
|
||||
when:
|
||||
- "'firefox' in ansible_facts.packages"
|
||||
- ansible_facts.packages['firefox'][0].version == "1:1snap1-0ubuntu2"
|
||||
|
||||
- name: add ppa
|
||||
apt_repository:
|
||||
repo: ppa:mozillateam/ppa
|
||||
|
||||
- name: set mozillateam higher priority
|
||||
copy:
|
||||
src: etc/apt/preferences.d/mozillateamppa
|
||||
dest: /etc/apt/preferences.d/mozillateamppa
|
||||
|
||||
- name: set mozillateam for unattended upgrades
|
||||
copy:
|
||||
src: etc/apt/apt.conf.d/51unattended-upgrades-firefox
|
||||
dest: /etc/apt/apt.conf.d/51unattended-upgrades-firefox
|
||||
|
||||
- name: install browser
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: latest
|
||||
pkg:
|
||||
- firefox
|
6
roles/firefox/tasks/update-alternatives.yml
Normal file
6
roles/firefox/tasks/update-alternatives.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
- name: Set firefox as x-www-browser
|
||||
become: yes
|
||||
cmd: update-alternatives --set x-www-browser /usr/bin/firefox
|
||||
|
||||
- name: update xdg default-web-browser
|
||||
cmd: xdg-settings set default-web-browser firefox.desktop
|
12
roles/firefox/tasks/upstream.yml
Normal file
12
roles/firefox/tasks/upstream.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
- name: remove snap
|
||||
become: yes
|
||||
community.general.snap:
|
||||
name: firefox
|
||||
state: absent
|
||||
|
||||
- name: install browser
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- firefox
|
|
@ -1,17 +0,0 @@
|
|||
- name: install lutris
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- lutris
|
||||
|
||||
- name: install steam
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- steam
|
||||
|
||||
- name: install ttf-liberation fonts for replacement for Arial font
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- ttf-liberation
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
- import_tasks: ubuntu.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: arch.yml
|
||||
when: ansible_distribution == "Archlinux"
|
|
@ -1,32 +0,0 @@
|
|||
---
|
||||
- become: yes
|
||||
block:
|
||||
- name: Add i386 Architecture
|
||||
command: dpkg --add-architecture i386
|
||||
|
||||
- name: Update APT Cache for i386
|
||||
apt:
|
||||
update_cache: true
|
||||
|
||||
- name: remove old ppa repository
|
||||
apt_repository:
|
||||
repo: ppa:lutris-team/lutris
|
||||
state: absent
|
||||
|
||||
- name: install lutris libraries
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- wine
|
||||
- steam
|
||||
|
||||
- name: "Get Lutris version"
|
||||
uri:
|
||||
url: https://api.github.com/repos/lutris/lutris/releases/latest
|
||||
body_format: json
|
||||
register: git_info
|
||||
|
||||
- name: Install deb package
|
||||
become: yes
|
||||
apt:
|
||||
deb: "{{ (git_info.json | json_query('assets[*].browser_download_url') | select('match', '.*deb'))[0] }}"
|
4
roles/java/tasks/main.yml
Normal file
4
roles/java/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- import_tasks: openjdk-8.yml
|
||||
|
||||
- import_tasks: openjdk-11.yml
|
33
roles/jetbrains/tasks/jetbrains-toolbox.yml
Normal file
33
roles/jetbrains/tasks/jetbrains-toolbox.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
- name: Create temp dir
|
||||
file:
|
||||
path: /tmp/jetbrains-toolbox
|
||||
state: directory
|
||||
|
||||
- name: Install jetbrains toolbox
|
||||
become: yes
|
||||
unarchive:
|
||||
src: https://data.services.jetbrains.com/products/download?platform=linux&code=TBA
|
||||
dest: /tmp/jetbrains-toolbox
|
||||
remote_src: yes
|
||||
mode: 0755
|
||||
|
||||
- name: get folder name
|
||||
shell: ls /tmp/jetbrains-toolbox
|
||||
register: dir_name
|
||||
|
||||
- name: Move foo to bar
|
||||
become: yes
|
||||
command: cp -ra /tmp/jetbrains-toolbox/{{ dir_name.stdout }}/jetbrains-toolbox /usr/local/bin/jetbrains-toolbox
|
||||
|
||||
- name: Remove temp directory
|
||||
become: yes
|
||||
file:
|
||||
path: /tmp/jetbrains-toolbox
|
||||
state: absent
|
||||
|
||||
- name: change chmod
|
||||
become: yes
|
||||
file:
|
||||
path: /usr/local/bin/jetbrains-toolbox
|
||||
mode: '0755'
|
9
roles/jetbrains/tasks/main.yml
Normal file
9
roles/jetbrains/tasks/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- stat:
|
||||
path: /usr/local/bin/jetbrains-toolbox
|
||||
register: toolbox_binary
|
||||
|
||||
- import_tasks: jetbrains-toolbox.yml
|
||||
when: not toolbox_binary.stat.exists
|
||||
|
||||
- import_tasks: system-setup.yml
|
|
@ -1,11 +0,0 @@
|
|||
Package: libgsticamerainterface-1.0-1
|
||||
Pin: version 0~git202207130901.4d4293d~ubuntu22.04.2
|
||||
Pin-Priority: 1000
|
||||
|
||||
Package: libipu6ep
|
||||
Pin: version 0~git202204010644.0797f74-1~ubuntu22.04.1
|
||||
Pin-Priority: 1000
|
||||
|
||||
Package: streamer1.0-icamera
|
||||
Pin: version 0~git202207130901.4d4293d~ubuntu22.04.2
|
||||
Pin-Priority: 1000
|
|
@ -9,4 +9,4 @@ Restart=on-failure
|
|||
ExecStart=/bin/bash -c 'echo 80 > /sys/class/power_supply/BAT0/charge_control_end_threshold'
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
|
@ -1,26 +1,14 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Limit 8C/16T CPU to 2C/4T
|
||||
echo 0 | tee /sys/devices/system/cpu/cpu[4-7]/online
|
||||
echo 0 | tee /sys/devices/system/cpu/cpu1[2-5]/online
|
||||
# Enable back all CPUs
|
||||
echo 1 | tee /sys/devices/system/cpu/cpu[2-7]/online
|
||||
echo 1 | tee /sys/devices/system/cpu/cpu1[0-5]/online
|
||||
|
||||
# Set CPU to governor to powersave
|
||||
cpupower frequency-set --governor powersave
|
||||
cpupower frequency-set --governor ondemand
|
||||
|
||||
# Set brightness to 120 / 255
|
||||
echo 120 | tee /sys/class/backlight/amdgpu_bl0/brightness
|
||||
echo 200 | tee /sys/class/backlight/amdgpu_bl0/brightness
|
||||
|
||||
# Disable bluetooth
|
||||
rfkill block bluetooth
|
||||
|
||||
# TODO disable some services
|
||||
# systemctl disable containerd.service
|
||||
# systemctl disable docker.service
|
||||
# systemctl disable bluetooth.service
|
||||
# systemctl disable libvirtd.service
|
||||
# systemctl disable winbind.service
|
||||
# systemctl disable snapd.service
|
||||
# systemctl disable cups.service
|
||||
# systemctl disable avahi-daemon.service
|
||||
|
||||
# TODO exit steam
|
||||
# Enable bluetooth
|
||||
rfkill unblock bluetooth
|
||||
|
|
|
@ -1,14 +1,26 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Enable back all CPUs
|
||||
echo 1 | tee /sys/devices/system/cpu/cpu[2-7]/online
|
||||
echo 1 | tee /sys/devices/system/cpu/cpu1[0-5]/online
|
||||
# Limit 8C/16T CPU to 2C/4T
|
||||
echo 0 | tee /sys/devices/system/cpu/cpu[2-7]/online
|
||||
echo 0 | tee /sys/devices/system/cpu/cpu1[0-5]/online
|
||||
|
||||
# Set CPU to governor to ondemand
|
||||
cpupower frequency-set --governor ondemand
|
||||
# Set CPU to governor to powersave
|
||||
cpupower frequency-set --governor powersave
|
||||
|
||||
# Set brightness to 200 / 255
|
||||
echo 200 | tee /sys/class/backlight/amdgpu_bl0/brightness
|
||||
# Set brightness to 120 / 255
|
||||
echo 120 | tee /sys/class/backlight/amdgpu_bl0/brightness
|
||||
|
||||
# Enable bluetooth
|
||||
rfkill unblock bluetooth
|
||||
# Disable bluetooth
|
||||
rfkill block bluetooth
|
||||
|
||||
# TODO disable some services
|
||||
# systemctl disable containerd.service
|
||||
# systemctl disable docker.service
|
||||
# systemctl disable bluetooth.service
|
||||
# systemctl disable libvirtd.service
|
||||
# systemctl disable winbind.service
|
||||
# systemctl disable snapd.service
|
||||
# systemctl disable cups.service
|
||||
# systemctl disable avahi-daemon.service
|
||||
|
||||
# TODO exit steam
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
- name: Check if it's laptop
|
||||
stat:
|
||||
path: /sys/class/power_supply/BAT0/charge_control_end_threshold
|
||||
register: battery_limiter_available
|
||||
|
||||
- name: Powersave tasks
|
||||
import_tasks: powersave.yml
|
||||
|
||||
- when: battery_limiter_available.stat.exists
|
||||
block:
|
||||
- import_tasks: battery.yml
|
||||
- import_tasks: asusctl.yml
|
||||
- import_tasks: supergfxctl.yml
|
||||
- import_tasks: nvidia-drivers.yml
|
|
@ -1,40 +0,0 @@
|
|||
- name: install required packages for asusctl
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- cmake
|
||||
- libayatana-appindicator3-1
|
||||
- libclang-dev
|
||||
- libgtk-3-dev
|
||||
- libglib2.0-dev
|
||||
- libgdk-pixbuf-2.0-dev
|
||||
- libpango1.0-dev
|
||||
- libudev-dev
|
||||
- make
|
||||
- rust-all
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: checkout asusctl repo
|
||||
git:
|
||||
repo: "{{ asusctl.repo }}"
|
||||
dest: "{{ desktop_src_dir }}/asusctl"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: build asusctl
|
||||
make:
|
||||
chdir: "{{ desktop_src_dir }}/asusctl"
|
||||
|
||||
- name: install asusctl
|
||||
become: yes
|
||||
make:
|
||||
chdir: "{{ desktop_src_dir }}/asusctl"
|
||||
target: install
|
||||
|
||||
- name: "Enable service"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: asusd
|
||||
state: started
|
||||
enabled: yes
|
|
@ -1,9 +1,33 @@
|
|||
- import_tasks: asusctl-build.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
- name: install required packages for asusctl
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- rust-all
|
||||
- libclang-dev
|
||||
- libudev-dev
|
||||
- make
|
||||
|
||||
- name: checkout asusctl repo
|
||||
git:
|
||||
repo: "{{ asusctl.repo }}"
|
||||
dest: "{{ ansible_user_dir }}/src/asusctl"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: build asusctl
|
||||
make:
|
||||
chdir: "{{ ansible_user_dir }}/src/asusctl"
|
||||
|
||||
- name: install asusctl
|
||||
shell:
|
||||
cmd:
|
||||
yay -S --needed --noconfirm asusctl
|
||||
when: ansible_distribution == "Archlinux"
|
||||
become: yes
|
||||
make:
|
||||
chdir: "{{ ansible_user_dir }}/src/asusctl"
|
||||
target: install
|
||||
|
||||
- name: "Enable service"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: asusctl
|
||||
state: started
|
||||
enabled: yes
|
|
@ -1,96 +0,0 @@
|
|||
- become: yes
|
||||
block:
|
||||
- name: Create temporary directory
|
||||
ansible.builtin.tempfile:
|
||||
state: directory
|
||||
register: tmp_dir
|
||||
|
||||
- name: add ppa
|
||||
apt_repository:
|
||||
repo: ppa:oem-solutions-engineers/oem-projects-meta
|
||||
|
||||
- name: install drivers
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: latest
|
||||
pkg:
|
||||
- oem-somerville-tentacool-meta
|
||||
|
||||
- name: Create temp dir
|
||||
file:
|
||||
path: "{{ tmp_dir.path }}"
|
||||
state: directory
|
||||
|
||||
- name: download dell configure
|
||||
unarchive:
|
||||
src: https://dl.dell.com/FOLDER09518608M/1/command-configure_4.10.0-5.ubuntu22_amd64.tar.gz
|
||||
dest: "{{ tmp_dir.path }}"
|
||||
remote_src: yes
|
||||
|
||||
- name: Making a list of files
|
||||
shell: "ls {{ tmp_dir.path }}"
|
||||
register: command_result
|
||||
|
||||
- name: Install a .deb package
|
||||
ansible.builtin.apt:
|
||||
deb: "{{ tmp_dir.path }}/{{ item }}"
|
||||
with_items:
|
||||
- "{{ command_result.stdout_lines | reverse }}"
|
||||
|
||||
- name: Remove temp directory
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ tmp_dir.path }}"
|
||||
state: absent
|
||||
|
||||
- name: Create temp dir
|
||||
file:
|
||||
path: "{{ tmp_dir.path }}"
|
||||
state: directory
|
||||
|
||||
- name: Download old libssl because dell don't know how to package manage or update dependencies
|
||||
get_url:
|
||||
url: http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.18_amd64.deb
|
||||
dest: "{{ tmp_dir.path }}/libssl1.deb"
|
||||
|
||||
- name: unpack deb file
|
||||
shell:
|
||||
cmd: "dpkg -x libssl1.deb {{ tmp_dir.path }}"
|
||||
chdir: "{{ tmp_dir.path }}"
|
||||
|
||||
- name: copy libs
|
||||
copy:
|
||||
src: "{{ tmp_dir.path }}/usr/lib/x86_64-linux-gnu/"
|
||||
dest: "/opt/dell/dcc"
|
||||
remote_src: yes
|
||||
|
||||
- name: Remove temp directory
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ tmp_dir.path }}"
|
||||
state: absent
|
||||
|
||||
- name: Install packages for camera
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: latest
|
||||
pkg:
|
||||
- linux-modules-ipu6-generic-hwe-22.04
|
||||
- linux-modules-ivsc-generic-hwe-22.04
|
||||
- libcamhal-ipu6ep0
|
||||
|
||||
- name: pin camera libs
|
||||
copy:
|
||||
src: etc/apt/preferences.d/cameralibs
|
||||
dest: /etc/apt/preferences.d/cameralibs
|
||||
mode: '0644'
|
||||
|
||||
- name: Install packages for camera
|
||||
apt:
|
||||
update_cache: yes
|
||||
allow_downgrade: true
|
||||
pkg:
|
||||
- libgsticamerainterface-1.0-1=0~git202207130901.4d4293d~ubuntu22.04.2
|
||||
- libipu6ep=0~git202204010644.0797f74-1~ubuntu22.04.1
|
||||
- gstreamer1.0-icamera=0~git202207130901.4d4293d~ubuntu22.04.2
|
|
@ -1,11 +1,13 @@
|
|||
- name: Asus X13 Flow (2022) specific tasks
|
||||
when:
|
||||
- ansible_facts.board_vendor == "ASUSTeK COMPUTER INC."
|
||||
- ansible_facts.board_name == "GV301RE"
|
||||
import_tasks: asus-x13-flow.yml
|
||||
- name: Check if it's laptop
|
||||
stat:
|
||||
path: /sys/class/power_supply/BAT0/charge_control_end_threshold
|
||||
register: battery_limiter_available
|
||||
|
||||
- name: Dell XPS 13 9320 specific tasks
|
||||
when:
|
||||
- ansible_facts.board_vendor == "Dell Inc."
|
||||
- ansible_facts.board_name == "0CW9KM"
|
||||
import_tasks: dell-xps13.yml
|
||||
- name: Powersave tasks
|
||||
import_tasks: powersave.yml
|
||||
|
||||
- when: battery_limiter_available.stat.exists
|
||||
block:
|
||||
- import_tasks: battery.yml
|
||||
- import_tasks: asusctl.yml
|
||||
- import_tasks: supergfxctl.yml
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
- name: "[Arch] install nvidia drivers"
|
||||
when: ansible_distribution == "Archlinux"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- nvidia
|
||||
- nvidia-settings
|
||||
- nvidia-prime
|
||||
- vulkan-radeon
|
||||
- xf86-video-amdgpu
|
||||
- libva-mesa-driver
|
||||
- lib32-amdvlk
|
||||
- lib32-nvidia-utils
|
||||
|
|
@ -1,18 +1,10 @@
|
|||
- name: install required packages for script [Ubuntu]
|
||||
- name: install required packages for script
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- linux-tools-common
|
||||
- linux-tools-generic
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: install required packages for script [Arch]
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- cpupower
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: copy scripts
|
||||
become: yes
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
- name: install required packages for supergfxctl
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- curl
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: checkout supergfxctl repo
|
||||
git:
|
||||
repo: "{{ supergfxctl.repo }}"
|
||||
dest: "{{ desktop_src_dir }}/supergfxctl"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: build supergfxctl
|
||||
make:
|
||||
chdir: "{{ desktop_src_dir }}/supergfxctl"
|
||||
|
||||
- name: install supergfxctl
|
||||
become: yes
|
||||
make:
|
||||
chdir: "{{ desktop_src_dir }}/supergfxctl"
|
||||
target: install
|
|
@ -1,15 +1,33 @@
|
|||
- import_tasks: supergfxctl-build.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
- name: install required packages for supergfxctl
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- curl
|
||||
- git
|
||||
- build-essential
|
||||
- make
|
||||
|
||||
- name: install supergfxctl
|
||||
shell:
|
||||
cmd:
|
||||
yay -S --needed --noconfirm supergfxctl
|
||||
when: ansible_distribution == "Archlinux"
|
||||
- name: checkout supergfxctl repo
|
||||
git:
|
||||
repo: "{{ asusctl.repo }}"
|
||||
dest: "{{ ansible_user_dir }}/src/supergfxctl"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: Enable supergfxctl
|
||||
- name: build asusctl
|
||||
make:
|
||||
chdir: "{{ ansible_user_dir }}/src/supergfxctl"
|
||||
|
||||
- name: install asusctl
|
||||
become: yes
|
||||
make:
|
||||
chdir: "{{ ansible_user_dir }}/src/supergfxctl"
|
||||
target: install
|
||||
|
||||
- name: "Enable service"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: supergfxd
|
||||
name: asusctl
|
||||
state: started
|
||||
enabled: yes
|
||||
enabled: yes
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 MiB |
|
@ -1,164 +0,0 @@
|
|||
#
|
||||
# General configuration
|
||||
#
|
||||
# start-default-seat = True to always start one seat if none are defined in the configuration
|
||||
# greeter-user = User to run greeter as
|
||||
# minimum-display-number = Minimum display number to use for X servers
|
||||
# minimum-vt = First VT to run displays on
|
||||
# lock-memory = True to prevent memory from being paged to disk
|
||||
# user-authority-in-system-dir = True if session authority should be in the system location
|
||||
# guest-account-script = Script to be run to setup guest account
|
||||
# logind-check-graphical = True to on start seats that are marked as graphical by logind
|
||||
# log-directory = Directory to log information to
|
||||
# run-directory = Directory to put running state in
|
||||
# cache-directory = Directory to cache to
|
||||
# sessions-directory = Directory to find sessions
|
||||
# remote-sessions-directory = Directory to find remote sessions
|
||||
# greeters-directory = Directory to find greeters
|
||||
# backup-logs = True to move add a .old suffix to old log files when opening new ones
|
||||
# dbus-service = True if LightDM provides a D-Bus service to control it
|
||||
#
|
||||
[LightDM]
|
||||
#start-default-seat=true
|
||||
#greeter-user=lightdm
|
||||
#minimum-display-number=0
|
||||
#minimum-vt=7 # Setting this to a value < 7 implies security issues, see FS#46799
|
||||
#lock-memory=true
|
||||
#user-authority-in-system-dir=false
|
||||
#guest-account-script=guest-account
|
||||
#logind-check-graphical=true
|
||||
#log-directory=/var/log/lightdm
|
||||
run-directory=/run/lightdm
|
||||
#cache-directory=/var/cache/lightdm
|
||||
#sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions
|
||||
#remote-sessions-directory=/usr/share/lightdm/remote-sessions
|
||||
#greeters-directory=$XDG_DATA_DIRS/lightdm/greeters:$XDG_DATA_DIRS/xgreeters
|
||||
#backup-logs=true
|
||||
#backup-logs=true
|
||||
#dbus-service=true
|
||||
|
||||
#
|
||||
# Seat configuration
|
||||
#
|
||||
# Seat configuration is matched against the seat name glob in the section, for example:
|
||||
# [Seat:*] matches all seats and is applied first.
|
||||
# [Seat:seat0] matches the seat named "seat0".
|
||||
# [Seat:seat-thin-client*] matches all seats that have names that start with "seat-thin-client".
|
||||
#
|
||||
# type = Seat type (local, xremote)
|
||||
# pam-service = PAM service to use for login
|
||||
# pam-autologin-service = PAM service to use for autologin
|
||||
# pam-greeter-service = PAM service to use for greeters
|
||||
# xserver-command = X server command to run (can also contain arguments e.g. X -special-option)
|
||||
# xmir-command = Xmir server command to run (can also contain arguments e.g. Xmir -special-option)
|
||||
# xserver-config = Config file to pass to X server
|
||||
# xserver-layout = Layout to pass to X server
|
||||
# xserver-allow-tcp = True if TCP/IP connections are allowed to this X server
|
||||
# xserver-share = True if the X server is shared for both greeter and session
|
||||
# xserver-hostname = Hostname of X server (only for type=xremote)
|
||||
# xserver-display-number = Display number of X server (only for type=xremote)
|
||||
# xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true)
|
||||
# xdmcp-port = XDMCP UDP/IP port to communicate on
|
||||
# xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf)
|
||||
# greeter-session = Session to load for greeter
|
||||
# greeter-hide-users = True to hide the user list
|
||||
# greeter-allow-guest = True if the greeter should show a guest login option
|
||||
# greeter-show-manual-login = True if the greeter should offer a manual login option
|
||||
# greeter-show-remote-login = True if the greeter should offer a remote login option
|
||||
# user-session = Session to load for users
|
||||
# allow-user-switching = True if allowed to switch users
|
||||
# allow-guest = True if guest login is allowed
|
||||
# guest-session = Session to load for guests (overrides user-session)
|
||||
# session-wrapper = Wrapper script to run session with
|
||||
# greeter-wrapper = Wrapper script to run greeter with
|
||||
# guest-wrapper = Wrapper script to run guest sessions with
|
||||
# display-setup-script = Script to run when starting a greeter session (runs as root)
|
||||
# display-stopped-script = Script to run after stopping the display server (runs as root)
|
||||
# greeter-setup-script = Script to run when starting a greeter (runs as root)
|
||||
# session-setup-script = Script to run when starting a user session (runs as root)
|
||||
# session-cleanup-script = Script to run when quitting a user session (runs as root)
|
||||
# autologin-guest = True to log in as guest by default
|
||||
# autologin-user = User to log in with by default (overrides autologin-guest)
|
||||
# autologin-user-timeout = Number of seconds to wait before loading default user
|
||||
# autologin-session = Session to load for automatic login (overrides user-session)
|
||||
# autologin-in-background = True if autologin session should not be immediately activated
|
||||
# exit-on-failure = True if the daemon should exit if this seat fails
|
||||
#
|
||||
[Seat:*]
|
||||
#type=local
|
||||
#pam-service=lightdm
|
||||
#pam-autologin-service=lightdm-autologin
|
||||
#pam-greeter-service=lightdm-greeter
|
||||
#xserver-command=X
|
||||
#xmir-command=Xmir
|
||||
#xserver-config=
|
||||
#xserver-layout=
|
||||
#xserver-allow-tcp=false
|
||||
#xserver-share=true
|
||||
#xserver-hostname=
|
||||
#xserver-display-number=
|
||||
#xdmcp-manager=
|
||||
#xdmcp-port=177
|
||||
#xdmcp-key=
|
||||
greeter-session=lightdm-slick-greeter
|
||||
#greeter-hide-users=false
|
||||
#greeter-allow-guest=true
|
||||
#greeter-show-manual-login=false
|
||||
#greeter-show-remote-login=true
|
||||
#user-session=default
|
||||
#allow-user-switching=true
|
||||
#allow-guest=true
|
||||
#guest-session=
|
||||
session-wrapper=/etc/lightdm/Xsession
|
||||
#greeter-wrapper=
|
||||
#guest-wrapper=
|
||||
#display-setup-script=
|
||||
#display-stopped-script=
|
||||
#greeter-setup-script=
|
||||
#session-setup-script=
|
||||
#session-cleanup-script=
|
||||
#autologin-guest=false
|
||||
#autologin-user=
|
||||
#autologin-user-timeout=0
|
||||
#autologin-in-background=false
|
||||
#autologin-session=
|
||||
#exit-on-failure=false
|
||||
|
||||
#
|
||||
# XDMCP Server configuration
|
||||
#
|
||||
# enabled = True if XDMCP connections should be allowed
|
||||
# port = UDP/IP port to listen for connections on
|
||||
# listen-address = Host/address to listen for XDMCP connections (use all addresses if not present)
|
||||
# key = Authentication key to use for XDM-AUTHENTICATION-1 or blank to not use authentication (stored in keys.conf)
|
||||
# hostname = Hostname to report to XDMCP clients (defaults to system hostname if unset)
|
||||
#
|
||||
# The authentication key is a 56 bit DES key specified in hex as 0xnnnnnnnnnnnnnn. Alternatively
|
||||
# it can be a word and the first 7 characters are used as the key.
|
||||
#
|
||||
[XDMCPServer]
|
||||
#enabled=false
|
||||
#port=177
|
||||
#listen-address=
|
||||
#key=
|
||||
#hostname=
|
||||
|
||||
#
|
||||
# VNC Server configuration
|
||||
#
|
||||
# enabled = True if VNC connections should be allowed
|
||||
# command = Command to run Xvnc server with
|
||||
# port = TCP/IP port to listen for connections on
|
||||
# listen-address = Host/address to listen for VNC connections (use all addresses if not present)
|
||||
# width = Width of display to use
|
||||
# height = Height of display to use
|
||||
# depth = Color depth of display to use
|
||||
#
|
||||
[VNCServer]
|
||||
#enabled=false
|
||||
#command=Xvnc
|
||||
#port=5900
|
||||
#listen-address=
|
||||
#width=1024
|
||||
#height=768
|
||||
#depth=8
|
|
@ -1,7 +0,0 @@
|
|||
[Greeter]
|
||||
background=/usr/share/backgrounds/my/keys-l.jpg
|
||||
background-color=#1a5fb4
|
||||
icon-theme-name=Adwaita
|
||||
cursor-theme-name=Adwaita
|
||||
activate-numlock=true
|
||||
only-on-monitor=eDP
|
|
@ -1,34 +0,0 @@
|
|||
- name: "[Arch] install lightdm"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- accountsservice
|
||||
- lightdm
|
||||
- lightdm-slick-greeter
|
||||
|
||||
- name: Copy configuration
|
||||
become: yes
|
||||
copy:
|
||||
src: lightdm.conf
|
||||
dest: /etc/lightdm/lightdm.conf
|
||||
mode: '0644'
|
||||
|
||||
- name: Copy greeter configuration
|
||||
become: yes
|
||||
copy:
|
||||
src: slick-greeter.conf
|
||||
dest: /etc/lightdm/slick-greeter.conf
|
||||
mode: '0644'
|
||||
|
||||
- name: create backgrounds directory
|
||||
become: yes
|
||||
file:
|
||||
path: /usr/share/backgrounds/my
|
||||
state: directory
|
||||
|
||||
- name: Copy background
|
||||
become: yes
|
||||
copy:
|
||||
src: keys-l.jpg
|
||||
dest: /usr/share/backgrounds/my/keys-l.jpg
|
||||
mode: '0644'
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
- import_tasks: arch.yml
|
||||
when: ansible_distribution == "Archlinux"
|
21
roles/lutris/tasks/main.yml
Normal file
21
roles/lutris/tasks/main.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
- become: yes
|
||||
block:
|
||||
- name: Add i386 Architecture
|
||||
command: dpkg --add-architecture i386
|
||||
|
||||
- name: Update APT Cache for i386
|
||||
apt:
|
||||
update_cache: true
|
||||
|
||||
- name: add signal gpg key
|
||||
apt_repository:
|
||||
repo: ppa:lutris-team/lutris
|
||||
|
||||
- name: install lutris
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- lutris
|
||||
- wine
|
||||
- steam
|
|
@ -1,6 +0,0 @@
|
|||
- name: "[All] Enable lightdm service"
|
||||
become: yes
|
||||
ansible.builtin.systemd:
|
||||
name: lightdm
|
||||
state: started
|
||||
enabled: yes
|
|
@ -1,70 +0,0 @@
|
|||
- name: "[Arch] Update system"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
update_cache: true
|
||||
upgrade: true
|
||||
|
||||
- name: "[Arch] install jmespath for json_query"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name: python-jmespath
|
||||
|
||||
- name: "[Arch] install packages for building"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
name:
|
||||
- make
|
||||
|
||||
- name: "[Arch] install packages for building"
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
extra_args: --needed
|
||||
name:
|
||||
- git
|
||||
- base-devel
|
||||
- fakeroot
|
||||
|
||||
- name: "[Arch] create arch source dir"
|
||||
file:
|
||||
path: "{{ arch_src_dir }}"
|
||||
state: directory
|
||||
|
||||
- name: "[Arch] checkout yay"
|
||||
git:
|
||||
repo: https://aur.archlinux.org/yay.git
|
||||
dest: "{{ arch_src_dir }}/yay"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: "[Arch] install yay"
|
||||
command:
|
||||
chdir: "{{ arch_src_dir }}/yay"
|
||||
cmd:
|
||||
makepkg -si --needed --noconfirm
|
||||
|
||||
- name: "[Arch] update yay cache"
|
||||
shell:
|
||||
cmd: yay -Y --gendb
|
||||
|
||||
- name: "add multilib"
|
||||
become: yes
|
||||
lineinfile:
|
||||
dest: "/etc/pacman.conf"
|
||||
state: "present"
|
||||
line: "[multilib]"
|
||||
regexp: "^\\[multilib\\]"
|
||||
insertafter: "^#\\[multilib\\]"
|
||||
|
||||
- name: "add multilib (cont)"
|
||||
become: yes
|
||||
lineinfile:
|
||||
dest: "/etc/pacman.conf"
|
||||
state: "present"
|
||||
line: "Include = /etc/pacman.d/mirrorlist"
|
||||
insertafter: "^\\[multilib\\]"
|
||||
regexp: "Include = /etc/pacman.d/mirrorlist"
|
||||
|
||||
- name: Update cache
|
||||
become: yes
|
||||
community.general.pacman:
|
||||
update_cache: true
|
|
@ -1,14 +0,0 @@
|
|||
- name: Check if ssh keys exists
|
||||
stat:
|
||||
path: "{{ ansible_user_dir }}/.ssh/id_rsa"
|
||||
register: ssh_key
|
||||
|
||||
- name: Use SSH repositories
|
||||
set_fact:
|
||||
git: "{{ git_repos.ssh }}"
|
||||
when: ssh_key.stat.exists
|
||||
|
||||
- name: Use HTTPS repositories
|
||||
set_fact:
|
||||
git: "{{ git_repos.https }}"
|
||||
when: not ssh_key.stat.exists
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
- import_tasks: ubuntu.yml
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
- import_tasks: arch.yml
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- import_tasks: git-repos.yml
|
|
@ -1,15 +0,0 @@
|
|||
- name: install jmespath for json_query
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- python3-jmespath
|
||||
|
||||
- name: install packages for builds
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
- git
|
||||
- make
|
||||
- build-essential
|
26
roles/prusa-slicer/tasks/config-repository.yml
Normal file
26
roles/prusa-slicer/tasks/config-repository.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
- name: checkout prusa profiles repo
|
||||
git:
|
||||
repo: "{{ prusa_slicer.repo }}"
|
||||
dest: "{{ ansible_user_dir }}/.config/PrusaSlicer"
|
||||
clone: yes
|
||||
update: yes
|
||||
|
||||
- name: Install wrapper
|
||||
become: yes
|
||||
copy:
|
||||
src: usr/local/bin/prusa-slicer.wrapper
|
||||
dest: /usr/local/bin/prusa-slicer.wrapper
|
||||
mode: '0755'
|
||||
|
||||
- name: clean link
|
||||
become: yes
|
||||
file:
|
||||
path: "/usr/local/bin/prusa-slicer"
|
||||
state: absent
|
||||
|
||||
- name: Create symbolic link to wrapper
|
||||
become: yes
|
||||
file:
|
||||
src: "/usr/local/bin/prusa-slicer.wrapper"
|
||||
dest: "/usr/local/bin/prusa-slicer"
|
||||
state: link
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue