aboutsummaryrefslogtreecommitdiffstats
path: root/roles/workstation/templates
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-04 14:01:47 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-05 09:33:30 +0000
commit5c2e3443bedf0ef6a34888ea30361af7da314748 (patch)
treee792d59b44ef63981ccddbe39256a5f859df1f79 /roles/workstation/templates
parentedf06330b130c6499cf5166d63a3d106555df513 (diff)
downloadrules-5c2e3443bedf0ef6a34888ea30361af7da314748.tar.gz
roles: Add workstation role
Diffstat (limited to 'roles/workstation/templates')
-rwxr-xr-xroles/workstation/templates/apm-hibernate5
-rwxr-xr-xroles/workstation/templates/apm-resume16
-rwxr-xr-xroles/workstation/templates/apm-suspend5
-rw-r--r--roles/workstation/templates/xorg-intel.conf9
4 files changed, 35 insertions, 0 deletions
diff --git a/roles/workstation/templates/apm-hibernate b/roles/workstation/templates/apm-hibernate
new file mode 100755
index 0000000..ef90fed
--- /dev/null
+++ b/roles/workstation/templates/apm-hibernate
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -x -e
+
+pkill -USR1 xidle
diff --git a/roles/workstation/templates/apm-resume b/roles/workstation/templates/apm-resume
new file mode 100755
index 0000000..18397b4
--- /dev/null
+++ b/roles/workstation/templates/apm-resume
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -x -e
+
+sleep 3
+
+sh /etc/netstart iwn0
+
+wg_interfaces=$(find /etc/wireguard -type f | sed 's/\.conf$//g')
+for wg_interface in ${wg_interfaces}; do
+ wg_interface=$(basename "${wg_interface}")
+ wg-quick down "${wg_interface}"
+ wg-quick up "${wg_interface}"
+done
+
+rcctl -d restart pcscd
diff --git a/roles/workstation/templates/apm-suspend b/roles/workstation/templates/apm-suspend
new file mode 100755
index 0000000..ef90fed
--- /dev/null
+++ b/roles/workstation/templates/apm-suspend
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -x -e
+
+pkill -USR1 xidle
diff --git a/roles/workstation/templates/xorg-intel.conf b/roles/workstation/templates/xorg-intel.conf
new file mode 100644
index 0000000..5d73c65
--- /dev/null
+++ b/roles/workstation/templates/xorg-intel.conf
@@ -0,0 +1,9 @@
+
+# disable tearscreen for Xenocara on OpenBSD
+# managed by Ansible
+
+Section "Device"
+ Identifier "drm"
+ Driver "intel"
+ Option "TearFree" "true"
+EndSection
remember that computers suck.