Overdue commit

This commit is contained in:
Jonathan Cremin 2021-11-16 15:23:42 +00:00
parent 1e03c32201
commit 692269f9ff
49 changed files with 843 additions and 198 deletions

View file

@ -0,0 +1,5 @@
---
onepassword_cli_version: "v1.11.4"
mkcert_version: "v1.4.3"
btop_version: "1.0.22"

View file

@ -1,7 +0,0 @@
[1password]
name=1Password
baseurl=https://downloads.1password.com/linux/rpm
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://downloads.1password.com/linux/keys/1password.asc

View file

@ -1,25 +1,33 @@
---
# Run gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
- name: Install rpmfusion-free
dnf:
name: https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-34.noarch.rpm
name: https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-35.noarch.rpm
state: present
disable_gpg_check: 1
become: yes
- name: Install rpmfusion-nonfree
dnf:
name: https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-34.noarch.rpm
name: https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-35.noarch.rpm
state: present
disable_gpg_check: 1
become: yes
- name: Remove unwanted dnf packages
dnf:
name:
- gedit
state: absent
become: yes
- name: Install common dnf packages
dnf:
name:
- kernel-tools
- sysbench
- exa
- iperf3
- zsh
- zsh-syntax-highlighting
- make
@ -30,95 +38,17 @@
- tmux
- htop
- openssh-server
- chrome-gnome-shell
- celluloid
- gnome-extensions-app
- cheese
- geary
- curl
- neofetch
- virt-manager
- vim
- blueman
- pavucontrol
- gnome-shell-extension-appindicator
- gnome-shell-extension-gsconnect
- gnome-nettool
- gnome-maps
- gnome-calendar
- gnome-clocks
- gnome-tweaks
- tilix
- podman
- podman-compose
- dnf-plugins-core
- lm_sensors
enablerepo: rpmfusion-free
state: present
become: yes
- name: Add the flathub flatpak repository remote to the user installation
flatpak_remote:
name: flathub
state: present
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
method: user
- name: Install the gtk whats package from flathub for current user
flatpak:
name: com.gigitux.youp
state: present
remote: flathub
method: user
- name: Install the discord package from flathub for current user
flatpak:
name: com.discordapp.Discord
state: present
remote: flathub
method: user
- name: Install the element package from flathub for current user
flatpak:
name: im.riot.Riot
state: present
remote: flathub
method: user
- name: Install the telegram package from flathub for current user
flatpak:
name: org.telegram.desktop
state: present
remote: flathub
method: user
- name: Install the plexamp package from flathub for current user
flatpak:
name: com.plexamp.Plexamp
state: present
remote: flathub
method: user
- name: Install the girens package from flathub for current user
flatpak:
name: nl.g4d.Girens
state: present
remote: flathub
method: user
- name: Install Teleport tsh
dnf:
name: https://get.gravitational.com/teleport-5.1.0-1.x86_64.rpm
state: present
disable_gpg_check: yes
become: yes
- name: Install Steam
dnf:
name: steam
enablerepo: rpmfusion-nonfree-steam
state: present
become: yes
- name: Install ffmpeg
dnf:
name: ffmpeg
@ -126,69 +56,62 @@
state: present
become: yes
- name: Install Zoom
- name: Install 1password cli
unarchive:
src: "https://cache.agilebits.com/dist/1P/op/pkg/{{ onepassword_cli_version }}/op_linux_amd64_{{ onepassword_cli_version }}.zip"
dest: ~/.local/bin/
mode: 0755
remote_src: yes
#exclude:
#- op.sig
- name: Fetch mkcert binary
get_url:
url: "https://github.com/FiloSottile/mkcert/releases/download/{{ mkcert_version }}/mkcert-{{ mkcert_version }}-linux-amd64"
dest: ~/.local/bin/mkcert
mode: 0755
- name: Fetch gh-cli repo
get_url:
url: https://cli.github.com/packages/rpm/gh-cli.repo
dest: /etc/yum.repos.d/gh-cli.repo
mode: 0644
become: yes
- name: Install gh-cli
dnf:
name: https://zoom.us/client/latest/zoom_x86_64.rpm
name: gh
state: present
disable_gpg_check: 1
become: yes
# get latest slack version
# curl -s https://slack.com/intl/en-ie/downloads/linux | grep -o 'Version [0-9].[0-9].[0-9]' | grep -o '[0-9].[0-9].[0-9]'
- name: create ~/.local/share/btop/themes
file:
path: ~/.local/share/btop/themes
state: directory
mode: '0755'
- name: Import packagecloud key
rpm_key:
state: present
key: https://packagecloud.io/gpg.key
become: yes
- name: Fetch btop tarball and extract to ~/.local
unarchive:
src: https://github.com/aristocratos/btop/releases/download/v{{ btop_version }}/btop-{{ btop_version }}-x86_64-linux-musl.tbz
dest: ~/.local/
remote_src: yes
exclude:
- CHANGES.md
- install.sh
- LICENSE
- Makefile
- README.md
- setuid.sh
- uninstall.sh
creates: ~/.local/bin/btop
- name: Add slack repo
- name: Move btop themes to correct path
copy:
src: slack.repo
mode: "0644"
dest: /etc/yum.repos.d/slack.repo
become: yes
src: ~/.local/themes
dest: ~/.local/share/btop/
remote_src: yes
- name: Install Slack
dnf:
name: slack
- name: pip install yt-dlp
pip:
name: yt-dlp
state: present
become: yes
- name: Import microsoft key
rpm_key:
state: present
key: https://packages.microsoft.com/keys/microsoft.asc
become: yes
- name: Add vscode repo
copy:
src: vscode.repo
mode: "0644"
dest: /etc/yum.repos.d/vscode.repo
become: yes
- name: Install vscode
dnf:
name: code
state: present
become: yes
- name: Import 1Password's key
rpm_key:
state: present
key: https://downloads.1password.com/linux/keys/1password.asc
become: yes
- name: Add 1Password repo
copy:
src: 1password.repo
mode: "0644"
dest: /etc/yum.repos.d/1password.repo
become: yes
- name: Install 1password
dnf:
name: 1password
state: present
become: yes

View file

@ -0,0 +1,7 @@
[1password]
name=1Password Stable Channel
baseurl=https://downloads.1password.com/linux/rpm/stable/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey="https://downloads.1password.com/linux/keys/1password.asc"

View file

@ -0,0 +1,4 @@
properties = {
bluez5.msbc-support = true
bluez5.sbc-xq-support = true
}

View file

@ -0,0 +1,13 @@
[Unit]
Description=Enable AMD boost
Before=basic.target
After=local-fs.target sysinit.target
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/bin/sh -c "echo 1 > /sys/devices/system/cpu/cpufreq/boost"
[Install]
WantedBy=basic.target

3
roles/desktop/files/cam Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
hue lights 43 | grep -q off && hue lights 43 on || hue lights 43 off

View file

@ -0,0 +1,3 @@
[Service]
ExecStart=
ExecStart=/usr/libexec/bluetooth/bluetoothd --experimental

View file

@ -0,0 +1,6 @@
[teleport]
name=Gravitational Teleport packages
baseurl=https://rpm.releases.teleport.dev/
enabled=1
gpgcheck=1
gpgkey=https://rpm.releases.teleport.dev/RPM-GPG-KEY-teleport

View file

@ -1,5 +1,6 @@
[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc

View file

@ -0,0 +1,19 @@
---
- name: restart pipewire
systemd:
name: pipewire
scope: user
state: restarted
- name: restart bluetooth
service:
name: bluetooth
state: restarted
become: yes
- name: enable boost
systemd:
name: boost
enabled: yes
state: started
become: yes

View file

@ -0,0 +1,128 @@
---
- name: Add boost service for AMD 4800U
copy:
src: boost.service
mode: "0644"
dest: /lib/systemd/system/boost.service
when: ansible_processor[2] == "AMD Ryzen 7 4800U with Radeon Graphics"
notify: enable boost
become: yes
- name: Import dnf keys
rpm_key:
state: present
key: '{{ item }}'
loop:
- https://packagecloud.io/gpg.key
- https://packages.microsoft.com/keys/microsoft.asc
- https://rpm.releases.teleport.dev/RPM-GPG-KEY-teleport
# - https://downloads.1password.com/linux/keys/1password.asc
become: yes
- name: Add dnf repos
copy:
src: '{{ item }}'
mode: "0644"
dest: '/etc/yum.repos.d/{{ item }}'
loop:
- slack.repo
- vscode.repo
- teleport.repo
- 1password.repo
become: yes
- name: Install common desktop dnf packages
dnf:
name:
- deja-dup
- power-profiles-daemon # Adds power settings in gnome-settings-center
- chrome-gnome-shell
- celluloid
- gnome-extensions-app
- cheese
- geary
- pavucontrol
- gnome-shell-extension-appindicator
- gnome-shell-extension-gsconnect
- gnome-nettool
- gnome-maps
- gnome-calendar
- gnome-clocks
- gnome-tweaks
- bijiben # gnome notes
- tilix
- nodejs
- mpv
- steam
- ffmpeg
- slack
- 1password
- code
- teleport
enablerepo:
- rpmfusion-free
- rpmfusion-nonfree-steam
state: present
become: yes
- name: Add the flathub flatpak repository remote to the user installation
flatpak_remote:
name: flathub
state: present
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
method: user
- name: Install flatpaks from flathub
flatpak:
name:
- com.gigitux.youp
- com.discordapp.Discord
- im.riot.Riot
- org.telegram.desktop
- com.plexamp.Plexamp
- nl.g4d.Girens
- tech.feliciano.pocket-casts
- org.gnome.TextEditor
state: present
remote: flathub
method: user
- name: Install remote rpms
dnf:
name:
- https://zoom.us/client/latest/zoom_x86_64.rpm
- https://github.com/hensm/fx_cast/releases/download/v0.1.0/fx_cast_bridge-0.1.0-x64.rpm
- https://github.com/Kong/insomnia/releases/download/core%402021.5.3/Insomnia.Core-2021.5.3.rpm
state: present
disable_gpg_check: 1
become: yes
- name: create ~/.config/pipewire/media-session.d
file:
path: ~/.config/pipewire/media-session.d
state: directory
mode: '0755'
- name: Configure mSBC bluetooth codec
copy:
src: bluez-monitor.conf
mode: "0644"
dest: ~/.config/pipewire/media-session.d/bluez-monitor.conf
notify: restart pipewire
- name: create /etc/systemd/system/bluetooth.service.d/
file:
path: /etc/systemd/system/bluetooth.service.d/
state: directory
mode: '0755'
become: yes
- name: Activate Bluez experimental mode
copy:
src: override.conf
mode: "0644"
dest: /etc/systemd/system/bluetooth.service.d/override.conf
notify: restart bluetooth
become: yes

View file

@ -0,0 +1,4 @@
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", TAG+="uaccess"

View file

@ -0,0 +1,7 @@
---
- name: reload udev
service:
name: udev
state: reloaded
become: yes

View file

@ -0,0 +1,23 @@
---
- name: Add devdeck deps
dnf:
name:
- python3-pip
- python3-devel
- hidapi
state: present
become: yes
- name: create udev rules file for streamdeck
copy:
src: 99-streamdeck.rules
mode: "0644"
dest: /etc/udev/rules.d/99-streamdeck.rules
notify: reload udev
become: yes
- name: pip install devdeck
pip:
name: devdeck
state: present

View file

@ -8,7 +8,7 @@
- name: Fetch Firefox Developer Edition binary
unarchive:
src: https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US
src: https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64
dest: ~/.local/opt/
mode: 0755
remote_src: yes

View file

@ -6,6 +6,7 @@
- qt5-qttools-devel
- qt5-qtwebsockets-devel
- qt5-qtwebengine-devel
- openconnect
state: present
become: yes
@ -17,21 +18,8 @@
version: master
dest: /tmp/GlobalProtect-openconnect
- name: Qmake the Makefile
- name: Install using provided script
command:
chdir: /tmp/GlobalProtect-openconnect
cmd: qmake-qt5 CONFIG+=release
creates: /tmp/GlobalProtect-openconnect/Makefile
- name: Make all the things
command:
chdir: /tmp/GlobalProtect-openconnect
cmd: make
creates: /tmp/GlobalProtect-openconnect/GPClient/gpclient
- name: make install
command:
chdir: /tmp/GlobalProtect-openconnect
cmd: make install
cmd: ./scripts/install.sh
creates: /usr/bin/gpclient
become: yes

View file

@ -1,6 +1,7 @@
---
# Run gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
# Run gsettings set org.gnome.shell app-picker-layout "[]"
- name: Install gnome-extensions-cli
pip:
@ -15,3 +16,8 @@
- hue-lights@chlumskyvaclav.gmail.com
- espresso@coadmunkee.github.com
- sound-output-device-chooser@kgshank.net
- logomenu@aryan_k
- expandable-notifications@kaan.g.inam.org
- gsconnect@andyholmes.github.io
- bluetooth-quick-connect@bjarosze.gmail.com
- appindicatorsupport@rgcjonas.gmail.com

View file

@ -0,0 +1,28 @@
---
- name: Install rpmsphere-release
dnf:
name: https://github.com/rpmsphere/noarch/raw/master/r/rpmsphere-release-35.noarch.rpm
state: present
disable_gpg_check: 1
become: yes
- name: Install dlib
dnf:
name:
- python3-dlib
- pam_python
state: present
become: yes
- name: Enable copr project howdy
community.general.copr:
name: luya/howdy
state: disabled
become: yes
- name: Install howdy
dnf:
name: howdy
state: present
become: yes

View file

@ -0,0 +1,7 @@
---
- name: Install "hue-cli" node.js package globally.
community.general.npm:
name: hue-cli
global: yes
become: yes

View file

@ -0,0 +1 @@
has_gpu: False

View file

@ -0,0 +1,21 @@
[netdata]
name=netdata
baseurl=https://packagecloud.io/netdata/netdata/fedora/34/$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/netdata/netdata/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[netdata-source]
name=netdata-source
baseurl=https://packagecloud.io/netdata/netdata/fedora/34/SRPMS
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/netdata/netdata/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

View file

@ -0,0 +1,13 @@
---
- name: enable netdata
service:
name: netdata
state: started
enabled: yes
become: yes
- name: restart netdata
service:
name: netdata
state: restarted
become: yes

View file

@ -0,0 +1,39 @@
---
- name: Add netdata repo
copy:
src: netdata.repo
mode: "0644"
dest: /etc/yum.repos.d/netdata.repo
become: yes
- name: Install netdata
dnf:
name:
- netdata
notify: enable netdata
become: yes
- name: Add netdata conf
template:
src: netdata.conf.j2
mode: "0644"
dest: /etc/netdata/netdata.conf
notify: restart netdata
become: yes
- name: Add netdata python.d.conf
template:
src: python.d.conf.j2
mode: "0644"
dest: /etc/netdata/python.d.conf
notify: restart netdata
become: yes
- name: Add netdata nvidia_smi.conf
template:
src: nvidia_smi.conf.j2
mode: "0644"
dest: /etc/netdata/python.d/nvidia_smi.conf
notify: restart netdata
become: yes

View file

@ -0,0 +1,36 @@
# netdata configuration
#
# You can download the latest version of this file, using:
#
# wget -O /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
# or
# curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
#
# You can uncomment and change any of the options below.
# The value shown in the commented settings, is the default value.
#
# global netdata configuration
[global]
run as user = netdata
memory mode = ram
# the default database size - 1 hour
history = 3600
# some defaults to run netdata with least priority
process scheduling policy = idle
OOM score = 1000
stock config directory = /etc/netdata/conf.d
[web]
web files owner = root
web files group = netdata
# by default do not expose the netdata port
bind to = 0.0.0.0
[health]
stock health configuration directory = /etc/netdata/conf.d/health.d

View file

@ -0,0 +1,72 @@
# netdata python.d.plugin configuration for nvidia_smi
#
# This file is in YaML format. Generally the format is:
#
# name: value
#
# There are 2 sections:
# - global variables
# - one or more JOBS
#
# JOBS allow you to collect values from multiple sources.
# Each source will have its own set of charts.
#
# JOB parameters have to be indented (using spaces only, example below).
# ----------------------------------------------------------------------
# Global Variables
# These variables set the defaults for all JOBs, however each JOB
# may define its own, overriding the defaults.
# update_every sets the default data collection frequency.
# If unset, the python.d.plugin default is used.
# update_every: 1
# priority controls the order of charts at the netdata dashboard.
# Lower numbers move the charts towards the top of the page.
# If unset, the default for python.d.plugin is used.
# priority: 60000
# penalty indicates whether to apply penalty to update_every in case of failures.
# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes.
# penalty: yes
# autodetection_retry sets the job re-check interval in seconds.
# The job is not deleted if check fails.
# Attempts to start the job are made once every autodetection_retry.
# This feature is disabled by default.
# autodetection_retry: 0
# ----------------------------------------------------------------------
# JOBS (data collection sources)
#
# The default JOBS share the same *name*. JOBS with the same name
# are mutually exclusive. Only one of them will be allowed running at
# any time. This allows autodetection to try several alternatives and
# pick the one that works.
#
# Any number of jobs is supported.
#
# All python.d.plugin JOBS (for all its modules) support a set of
# predefined parameters. These are:
#
# job_name:
# name: myname # the JOB's name as it will appear at the
# # dashboard (by default is the job_name)
# # JOBs sharing a name are mutually exclusive
# update_every: 1 # the JOB's data collection frequency
# priority: 60000 # the JOB's order on the dashboard
# penalty: yes # the JOB's penalty
# autodetection_retry: 0 # the JOB's re-check interval in seconds
#
# Additionally to the above, example also supports the following:
#
# loop_mode: yes/no # default is yes. If set to yes `nvidia-smi` is executed in a separate thread using `-l` option.
# poll_seconds: SECONDS # default is 1. Sets the frequency of seconds the nvidia-smi tool is polled in loop mode.
# exclude_zero_memory_users: yes/no # default is no. Whether to collect users metrics with 0Mb memory allocation.
#
# ----------------------------------------------------------------------
update_every : 5
loop_mode : yes
poll_seconds : 5
exclude_zero_memory_users : yes

View file

@ -0,0 +1,112 @@
# netdata python.d.plugin configuration
#
# This file is in YaML format.
# Generally the format is:
#
# name: value
#
# Enable / disable the whole python.d.plugin (all its modules)
enabled: yes
# ----------------------------------------------------------------------
# Enable / Disable python.d.plugin modules
#default_run: yes
#
# If "default_run" = "yes" the default for all modules is enabled (yes).
# Setting any of these to "no" will disable it.
#
# If "default_run" = "no" the default for all modules is disabled (no).
# Setting any of these to "yes" will enable it.
# Enable / Disable explicit garbage collection (full collection run). Default is enabled.
gc_run: yes
# Garbage collection interval in seconds. Default is 300.
gc_interval: 300
# apache: yes
# apache_cache has been replaced by web_log
# adaptec_raid: yes
# alarms: yes
# am2320: yes
# anomalies: no
apache_cache: no
# beanstalk: yes
# bind_rndc: yes
# boinc: yes
# ceph: yes
chrony: no
# changefinder: no
# couchdb: yes
# dns_query_time: yes
# dnsdist: yes
# dockerd: yes
# dovecot: yes
# elasticsearch: yes
# energid: yes
# this is just an example
example: no
# exim: yes
# fail2ban: yes
# freeradius: yes
# gearman: yes
go_expvar: no
# gunicorn_log has been replaced by web_log
gunicorn_log: no
# haproxy: yes
# hddtemp: yes
# httpcheck: yes
hpssa: no
# icecast: yes
# ipfs: yes
# isc_dhcpd: yes
# litespeed: yes
logind: no
# megacli: yes
# memcached: yes
# mongodb: yes
# monit: yes
# mysql: yes
# nginx: yes
# nginx_plus: yes
{% if has_gpu %}
nvidia_smi: yes
{% endif %}
# nginx_log has been replaced by web_log
nginx_log: no
# nsd: yes
# ntpd: yes
# openldap: yes
# oracledb: yes
# ovpn_status_log: yes
# phpfpm: yes
# portcheck: yes
# postfix: yes
# postgres: yes
# powerdns: yes
# proxysql: yes
# puppet: yes
# rabbitmq: yes
# redis: yes
# rethinkdbs: yes
# retroshare: yes
# riakkv: yes
# samba: yes
sensors: yes
# smartd_log: yes
# spigotmc: yes
# springboot: yes
# squid: yes
# traefik: yes
# tomcat: yes
# tor: yes
# uwsgi: yes
# varnish: yes
# w1sensor: yes
# web_log: yes
# zscores: no

View file

@ -0,0 +1,7 @@
---
- name: Install nvidia CUDA for cli monitoring tools
dnf:
name:
- xorg-x11-drv-nvidia-cuda
become: yes

View file

@ -0,0 +1,7 @@
[hardware_razer]
name=hardware:razer (Fedora_35)
type=rpm-md
baseurl=https://download.opensuse.org/repositories/hardware:/razer/Fedora_35/
gpgcheck=1
gpgkey=https://download.opensuse.org/repositories/hardware:/razer/Fedora_35/repodata/repomd.xml.key
enabled=1

View file

@ -0,0 +1,22 @@
---
- name: Add openrazer repo
copy:
src: 'openrazer.repo'
mode: "0644"
dest: '/etc/yum.repos.d/openrazer.repo'
become: yes
- name: Install openrazer and polychromatic
dnf:
name:
- openrazer-meta
- polychromatic
become: yes
- name: Add jonathan to plugdev group
user:
name: jonathan
groups: plugdev
append: yes
become: yes

View file

@ -1,21 +1,12 @@
[Unit]
Description=Scream receiver
Documentation=https://github.com/duncanthrax/scream
Wants=network-pre.target
After=network-pre.target
[Service]
ExecStart=/usr/local/bin/scream -t 10
ExecStart=/usr/local/bin/scream -v -t 10 -n Windows
StandardOutput=journal
Restart=on-failure
RuntimeDirectory=scream
RuntimeDirectoryMode=0755
StateDirectory=scream
StateDirectoryMode=0750
CacheDirectory=scream
CacheDirectoryMode=0750
Type=simple
[Install]
WantedBy=multi-user.target
WantedBy=default.target

View file

@ -0,0 +1,8 @@
---
- name: enable scream
systemd:
name: scream
scope: user
state: started
enabled: yes

View file

@ -44,8 +44,9 @@
mode: '0755'
state: directory
- name: Create systemd unit
- name: Create scream systemd service
copy:
src: scream.service
mode: '0755'
mode: "0644"
dest: ~/.config/systemd/user/scream.service
notify: enable scream

View file

@ -1,4 +1,4 @@
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", MODE:="666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", MODE:="666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", MODE:="666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", MODE:="666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", TAG+="uaccess"

View file

@ -3,7 +3,7 @@ Type=Application
Encoding=UTF-8
Name=Streamdeck
Comment=A controller for Streamdeck devices
Icon=/usr/local/lib/python3.8/dist-packages/streamdeck_ui/logo.png
Exec=streamdeck_ui
Icon=/home/jonathan/.local/lib/python3.9/site-packages/streamdeck_ui/logo.png
Exec=/home/jonathan/.local/bin/streamdeck
Terminal=false
Categories=GTK;GNOME

View file

@ -1,11 +1,11 @@
---
- name: Add streamdeck-ui deps
apt:
dnf:
name:
- libhidapi-hidraw0
- libudev-dev
- libusb-1.0-0-dev
- python3-pip
- python3-devel
- hidapi
state: present
become: yes
@ -17,19 +17,16 @@
notify: reload udev
become: yes
- name: pip3 install streamdeck_ui
- name: pip install streamdeck_ui
pip:
name: streamdeck_ui
state: present
executable: /usr/bin/pip3
become: yes
- name: replace crappy panel icon
copy:
src: streamdeck.png
mode: "0644"
dest: /usr/local/lib/python3.8/dist-packages/streamdeck_ui/logo.png
become: yes
dest: /home/jonathan/.local/lib/python3.9/site-packages/streamdeck_ui/logo.png
- name: create streamdeck_ui .desktop
copy:

View file

@ -0,0 +1,23 @@
# container-syncthing.service
# autogenerated by Podman 3.4.1
# Mon Nov 8 12:46:17 GMT 2021
[Unit]
Description=Podman container-syncthing.service
Documentation=man:podman-generate-systemd(1)
Wants=network-online.target
After=network-online.target
RequiresMountsFor=/run/user/1000/containers
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Restart=on-failure
TimeoutStopSec=70
ExecStart=/usr/bin/podman start --conmon-pidfile=/run/user/1000/containers/overlay-containers/a28350af37850f9c5df8a2884e974c79f64d0dc30bece852d5d1c341a47334c9/userdata/conmon.pid syncthing
ExecStop=/usr/bin/podman stop --conmon-pidfile=/run/user/1000/containers/overlay-containers/a28350af37850f9c5df8a2884e974c79f64d0dc30bece852d5d1c341a47334c9/userdata/conmon.pid -t 10 syncthing
ExecStopPost=/usr/bin/podman stop --conmon-pidfile=/run/user/1000/containers/overlay-containers/a28350af37850f9c5df8a2884e974c79f64d0dc30bece852d5d1c341a47334c9/userdata/conmon.pid -t 10 syncthing
PIDFile=/run/user/1000/containers/overlay-containers/a28350af37850f9c5df8a2884e974c79f64d0dc30bece852d5d1c341a47334c9/userdata/conmon.pid
Type=forking
[Install]
WantedBy=multi-user.target default.target

View file

@ -0,0 +1,37 @@
---
- name: Create ~/.local/share/systemd/user/
file:
dest: ~/.local/share/systemd/user/
mode: '0755'
owner: jonathan
group: jonathan
state: directory
- name: Create Systemd unit for Syncthing
copy:
src: syncthing.service
mode: "0644"
dest: ~/.local/share/systemd/user/syncthing.service
- name: Create and start Syncthing container
containers.podman.podman_container:
name: syncthing
image: docker.io/syncthing/syncthing
user: "0"
memory: 512m
env:
PUID: "0"
PGID: "0"
volume:
- /home/jonathan/.config/podman/etc/syncthing:/var/syncthing/config:Z
- /home/jonathan/.config/podman/syncthing/:/var/syncthing:Z
- /home/jonathan/Sync:/home/jonathan/Sync:Z
- /home/jonathan/Code:/home/jonathan/Code:Z
- /home/jonathan/Udemy:/home/jonathan/Udemy:Z
- /home/jonathan/Pictures:/home/jonathan/Pictures:Z
- /home/jonathan/Documents:/home/jonathan/Documents:Z
network: host
restart_policy: on-failure:5

View file

@ -5,11 +5,11 @@
cmd: dnf config-manager --add-repo https://pkgs.tailscale.com/stable/fedora/tailscale.repo
creates: /etc/yum.repos.d/tailscale.repo
warn: false
notify: enable tailscaled
become: yes
- name: Install tailscale
dnf:
name:
- tailscale
notify: enable tailscaled
become: yes