aboutsummaryrefslogtreecommitdiff
path: root/etc/systemd/system
diff options
context:
space:
mode:
Diffstat (limited to 'etc/systemd/system')
-rw-r--r--etc/systemd/system/fix-f4-led.service11
-rw-r--r--etc/systemd/system/he-ipv6-update.service26
-rw-r--r--etc/systemd/system/var-lib-mpd-music.automount9
-rw-r--r--etc/systemd/system/var-lib-mpd-music.mount11
4 files changed, 57 insertions, 0 deletions
diff --git a/etc/systemd/system/fix-f4-led.service b/etc/systemd/system/fix-f4-led.service
new file mode 100644
index 0000000..87ccb0f
--- /dev/null
+++ b/etc/systemd/system/fix-f4-led.service
@@ -0,0 +1,11 @@
+# Enable with
+# systemctl enable --now fix-f4-led.service
+[Unit]
+Description=Fix F4 LED on Thinkpad
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh -c "echo 0 > /sys/class/leds/platform::micmute/brightness"
+
+[Install]
+WantedBy=multi-user.target
diff --git a/etc/systemd/system/he-ipv6-update.service b/etc/systemd/system/he-ipv6-update.service
new file mode 100644
index 0000000..e265b60
--- /dev/null
+++ b/etc/systemd/system/he-ipv6-update.service
@@ -0,0 +1,26 @@
+[Unit]
+Description=Update he-ipv6 tunnel end point
+After=network-online.target
+
+[Service]
+Type=oneshot
+ExecStart=curl --silent "https://USERNAME:PASSWORD@ipv4.tunnelbroker.net/nic/update?hostname=801807"
+# Prevent acquiring new privileges. Warning: breaks execution of SUID binaries
+NoNewPrivileges=yes
+PermissionsStartOnly=true
+# Prevent access to /dev
+PrivateDevices=yes
+# Use dedicated /tmp
+PrivateTmp=yes
+PrivateUsers=true
+# Hide user homes
+ProtectHome=yes
+# Prevent loading or reading kernel modules
+ProtectKernelModules=yes
+# Prevent altering kernel tunables
+ProtectKernelTunables=yes
+# strict or full, see docs
+ProtectSystem=strict
+
+[Install]
+WantedBy=network-online.target
diff --git a/etc/systemd/system/var-lib-mpd-music.automount b/etc/systemd/system/var-lib-mpd-music.automount
new file mode 100644
index 0000000..7314a79
--- /dev/null
+++ b/etc/systemd/system/var-lib-mpd-music.automount
@@ -0,0 +1,9 @@
+[Unit]
+Description=Automount /var/lib/mpd/music
+
+[Automount]
+Where=/var/lib/mpd/music
+DirectoryMode=0555
+
+[Install]
+WantedBy=multi-user.target mpd.service
diff --git a/etc/systemd/system/var-lib-mpd-music.mount b/etc/systemd/system/var-lib-mpd-music.mount
new file mode 100644
index 0000000..bab6239
--- /dev/null
+++ b/etc/systemd/system/var-lib-mpd-music.mount
@@ -0,0 +1,11 @@
+[Unit]
+Description=MPD music mount
+Requires=zfs-mount.service
+
+[Mount]
+What=/media/t/music_clean
+Where=/var/lib/mpd/music
+Options=bind,ro
+
+[Install]
+WantedBy=multi-user.target