diff --git a/systemd/example.conf b/systemd/example.conf new file mode 100644 index 00000000..16a49a53 --- /dev/null +++ b/systemd/example.conf @@ -0,0 +1,23 @@ +# Configuration profile for the templated systemd user unit jack@.service +# A (modified) copy of this configuration can be used to start jackd staticly +# for a user, which has the upside, that other systemd user units can depend on +# it. +# +# The systemd user service expects the configuration profiles to be located +# below /etc/jack or the user's $XDG_CONFIG_HOME and can then be started using +# ssystemctl (i.e. `systemctl --user start jack@example`). +# +# For further details regarding the various options and drivers, see `man 1 +# jackd`. +# + +# The name of the +JACK_DEFAULT_SERVER="default" +# options (e.g. -m, -n, -p, -r, -P, -t, -C, -u, -v) +JACK_OPTIONS="" +# backends (e.g. alsa, dummy, firewire, netone, oss, portaudio) +DRIVER="alsa" +# the device name +DEVICE="hw:PCH,0" +# specific settings for the driver in use +DRIVER_SETTINGS="" diff --git a/systemd/jack@.service b/systemd/jack@.service new file mode 100644 index 00000000..17832b55 --- /dev/null +++ b/systemd/jack@.service @@ -0,0 +1,15 @@ +[Unit] +Description=JACK server using %i.conf profile +Documentation=man:jackd(1) +After=sound.target local-fs.target + +[Service] +Type=dbus +EnvironmentFile=-/etc/jack/%i.conf +EnvironmentFile=-%h/.config/jack/%i.conf +ExecStart=/usr/bin/jackd $JACK_OPTIONS -d $DRIVER -d $DEVICE $DRIVER_SETTINGS +LimitRTPRIO=95 +LimitRTTIME=infinity + +[Install] +WantedBy=default.target