aboutsummaryrefslogtreecommitdiff
path: root/void
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-03-05 15:05:06 -0500
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-03-05 15:05:06 -0500
commitd345455cc91df176b2b1ec7d50e67967c3f18c0c (patch)
tree42630111a87f0e7a16166e89ecb7d11e44850ed3 /void
parent26c2673b6923a1906c8c4cfcf70bd4c79916e417 (diff)
downloadhome-d345455cc91df176b2b1ec7d50e67967c3f18c0c.tar.gz
more improvements to service management
Diffstat (limited to 'void')
-rw-r--r--void/home.nix6
-rwxr-xr-xvoid/services/dbus/log/run3
-rwxr-xr-xvoid/services/dbus/run11
-rwxr-xr-xvoid/services/pipewire/log/run3
-rwxr-xr-xvoid/services/pipewire/run1
5 files changed, 24 insertions, 0 deletions
diff --git a/void/home.nix b/void/home.nix
index 50fdb4a..482e31c 100644
--- a/void/home.nix
+++ b/void/home.nix
@@ -32,13 +32,19 @@
services = {
enable = true;
+ coreServices = ["dbus"];
services = {
"pipewire" = {
run = "${builtins.readFile ./services/pipewire/run}";
+ log = "${builtins.readFile ./services/pipewire/log/run}";
};
"mpd" = {
run = "${builtins.readFile ./services/mpd/run}";
};
+ "dbus" = {
+ run = "${builtins.readFile ./services/dbus/run}";
+ log = "${builtins.readFile ./services/dbus/log/run}";
+ };
};
};
};
diff --git a/void/services/dbus/log/run b/void/services/dbus/log/run
new file mode 100755
index 0000000..e19b6ec
--- /dev/null
+++ b/void/services/dbus/log/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec vlogger -t dbus-$(id -u) -p daemon
diff --git a/void/services/dbus/run b/void/services/dbus/run
new file mode 100755
index 0000000..dc7473e
--- /dev/null
+++ b/void/services/dbus/run
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+[ -r ./conf ] && . ./conf
+
+: "${DBUS_SESSION_BUS_ADDRESS:=unix:path=/run/user/$(id -u)/bus}"
+
+if [ -d "$TURNSTILE_ENV_DIR" ]; then
+ echo "$DBUS_SESSION_BUS_ADDRESS" > "$TURNSTILE_ENV_DIR"/DBUS_SESSION_BUS_ADDRESS
+fi
+
+exec chpst -e "$TURNSTILE_ENV_DIR" dbus-daemon --session --nofork --nopidfile --address="$DBUS_SESSION_BUS_ADDRESS" $OPTS
diff --git a/void/services/pipewire/log/run b/void/services/pipewire/log/run
new file mode 100755
index 0000000..223169a
--- /dev/null
+++ b/void/services/pipewire/log/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec vlogger -t pipewire-$(id -u) -p daemon
diff --git a/void/services/pipewire/run b/void/services/pipewire/run
index 1de4c3b..e3a5513 100755
--- a/void/services/pipewire/run
+++ b/void/services/pipewire/run
@@ -1,3 +1,4 @@
#!/bin/sh
exec chpst -e "$TURNSTILE_ENV_DIR" pipewire
+