runit: be smarter about how to setup daemons
This commit is contained in:
parent
2032f51e43
commit
dedcf874c9
43
config.yaml
43
config.yaml
|
@ -56,6 +56,10 @@ variables:
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
profiles:
|
profiles:
|
||||||
|
###############################################################
|
||||||
|
|
||||||
|
###############################################################
|
||||||
|
# Accents
|
||||||
###############################################################
|
###############################################################
|
||||||
|
|
||||||
dark:
|
dark:
|
||||||
|
@ -163,10 +167,8 @@ profiles:
|
||||||
|
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# Os profiles
|
|
||||||
###############################################################
|
|
||||||
|
|
||||||
common:
|
common:
|
||||||
|
###############################################################
|
||||||
variables:
|
variables:
|
||||||
# gtk_theme: "Mint-Y{{@@ '-Dark' if color.type == 'dark' else '' @@}}-{{@@ accent_color_name.capitalize() @@}}"
|
# gtk_theme: "Mint-Y{{@@ '-Dark' if color.type == 'dark' else '' @@}}-{{@@ accent_color_name.capitalize() @@}}"
|
||||||
gtk_theme: "Orchis-{{@@ accent_color_name.lower() @@}}-{{@@ 'dark' if color.type == 'dark' else 'light' @@}}"
|
gtk_theme: "Orchis-{{@@ accent_color_name.lower() @@}}-{{@@ 'dark' if color.type == 'dark' else 'light' @@}}"
|
||||||
|
@ -231,33 +233,18 @@ profiles:
|
||||||
- xdpw
|
- xdpw
|
||||||
- zathura
|
- zathura
|
||||||
|
|
||||||
|
###############################################################
|
||||||
|
# Os profiles
|
||||||
|
###############################################################
|
||||||
|
|
||||||
voidlinux:
|
voidlinux:
|
||||||
include:
|
include:
|
||||||
- "common"
|
- "common"
|
||||||
variables:
|
variables:
|
||||||
|
user_svdir: $HOME/.config/runit
|
||||||
supervisor: runit
|
supervisor: runit
|
||||||
runit_enable:
|
|
||||||
- gammastep
|
|
||||||
- kanshi
|
|
||||||
- kdeconnect-indicator
|
|
||||||
- kdeconnectd
|
|
||||||
- libinput-gestures
|
|
||||||
- mako
|
|
||||||
- mpDris2
|
|
||||||
- mpd
|
|
||||||
- notify-mail
|
|
||||||
- pipewire
|
|
||||||
- pipewire-media-session
|
|
||||||
- pulseaudio
|
|
||||||
- swayidle
|
|
||||||
- syncthing
|
|
||||||
- telegram
|
|
||||||
- udiskie
|
|
||||||
- waybar
|
|
||||||
- xdpw
|
|
||||||
- xsettingsd
|
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- services
|
- runit_services
|
||||||
|
|
||||||
artixlinux:
|
artixlinux:
|
||||||
include:
|
include:
|
||||||
|
@ -358,8 +345,6 @@ actions:
|
||||||
https://github.com/alexanderjeurissen/ranger_devicons
|
https://github.com/alexanderjeurissen/ranger_devicons
|
||||||
~/.config/ranger/plugins/ranger_devicons
|
~/.config/ranger/plugins/ranger_devicons
|
||||||
|
|
||||||
enable_runit_services: _runit_config "{{@@ _dotfile_abs_dst @@}}" {{@@ ' '.join(runit_enable) @@}}
|
|
||||||
|
|
||||||
# bootstrap scripts
|
# bootstrap scripts
|
||||||
pam_gpg: _pam-gpg-strap
|
pam_gpg: _pam-gpg-strap
|
||||||
make_theme: _make_theme
|
make_theme: _make_theme
|
||||||
|
@ -485,11 +470,9 @@ dotfiles: # Just a bunch of paths and action mappings
|
||||||
- make_theme
|
- make_theme
|
||||||
- groups_install
|
- groups_install
|
||||||
|
|
||||||
services:
|
runit_services:
|
||||||
src: runit_sv
|
src: runit_sv
|
||||||
dst: ~/.config/runit/sv
|
dst: ~/.config/runit
|
||||||
actions:
|
|
||||||
- enable_runit_services
|
|
||||||
|
|
||||||
libinput-gestures:
|
libinput-gestures:
|
||||||
src: libinput-gestures.conf
|
src: libinput-gestures.conf
|
||||||
|
|
|
@ -15,7 +15,9 @@ if status is-interactive
|
||||||
source {$__fish_config_dir}/keys.fish
|
source {$__fish_config_dir}/keys.fish
|
||||||
source {$__fish_config_dir}/tmux.fish
|
source {$__fish_config_dir}/tmux.fish
|
||||||
source {$__fish_config_dir}/colors.fish
|
source {$__fish_config_dir}/colors.fish
|
||||||
source {$__fish_config_dir}/plugins.fish
|
if test "$USER" != root
|
||||||
|
source {$__fish_config_dir}/plugins.fish
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
exec _start_dbus-daemon
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
PATH="/usr/lib/geoclue-2.0/demos/:/usr/libexec/geoclue-2.0/demos/"
|
|
||||||
|
|
||||||
exec agent
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
exec light -N 1
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
exec redshift
|
|
|
@ -1,42 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
mkdir -p "$1"
|
|
||||||
cd `dirname $1` && shift
|
|
||||||
|
|
||||||
create_logger() {
|
|
||||||
pushd sv/
|
|
||||||
for svd in */; do
|
|
||||||
pushd "$svd"
|
|
||||||
|
|
||||||
if ! test -d log; then
|
|
||||||
mkdir -p log
|
|
||||||
ln -s "$(which _default_logger)" log/run
|
|
||||||
fi
|
|
||||||
|
|
||||||
popd
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
enable_defaults() {
|
|
||||||
|
|
||||||
mkdir -p "runsvdir/default"
|
|
||||||
pushd "runsvdir/default"
|
|
||||||
|
|
||||||
svdir="$(readlink -f ../../sv)"
|
|
||||||
|
|
||||||
for sv; do
|
|
||||||
ln -fs "$svdir/$sv" .
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
create_logger
|
|
||||||
|
|
||||||
test -f .inited && exit 0
|
|
||||||
|
|
||||||
enable_defaults "$@"
|
|
||||||
|
|
||||||
touch .inited
|
|
|
@ -42,7 +42,7 @@ include modes
|
||||||
include assigns
|
include assigns
|
||||||
|
|
||||||
{%@@ if profile in ["voidlinux"] @@%}
|
{%@@ if profile in ["voidlinux"] @@%}
|
||||||
set $user_svd "$HOME/.config/runit/runsvdir/default"
|
set $user_svd "{{@@ user_svdir @@}}"
|
||||||
exec_always pgrep -u "$USER" "^runsvdir$" || runsvdir $user_svd
|
exec_always pgrep -u "$USER" "^runsvdir$" || runsvdir $user_svd
|
||||||
exec_always env SVDIR=$user_svd sv hup kanshi
|
exec_always env SVDIR=$user_svd sv hup kanshi
|
||||||
exec_always env SVDIR=$user_svd sv hup waybar
|
exec_always env SVDIR=$user_svd sv hup waybar
|
||||||
|
@ -51,6 +51,7 @@ include assigns
|
||||||
include daemons
|
include daemons
|
||||||
{%@@ endif @@%}
|
{%@@ endif @@%}
|
||||||
|
|
||||||
|
exec light -N 1
|
||||||
exec dbus-update-activation-environment DISPLAY XAUTHORITY SWAYSOCK I3SOCK WAYLAND_DISPLAY
|
exec dbus-update-activation-environment DISPLAY XAUTHORITY SWAYSOCK I3SOCK WAYLAND_DISPLAY
|
||||||
|
|
||||||
# Prevent the screen from locking if fullscreen
|
# Prevent the screen from locking if fullscreen
|
||||||
|
|
|
@ -43,7 +43,7 @@ actions:
|
||||||
dbus_uuidgen: dbus-uuidgen --ensure
|
dbus_uuidgen: dbus-uuidgen --ensure
|
||||||
sysctl_apply: sysctl -a
|
sysctl_apply: sysctl -a
|
||||||
mkinitcpio: mkinitcpio -P
|
mkinitcpio: mkinitcpio -P
|
||||||
enable_runit_services: _runit_config "{{@@ _dotfile_abs_dst @@}}" {{@@ ' '.join(runit_autostart) @@}}
|
enable_runit_services: ln -sf "{{@@ sys_services @@}}/{0}" "{{@@ sys_svdir @@}}/{0}"
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
profiles:
|
profiles:
|
||||||
|
@ -63,25 +63,15 @@ profiles:
|
||||||
|
|
||||||
voidlinux:
|
voidlinux:
|
||||||
variables:
|
variables:
|
||||||
runit_autostart:
|
sys_services: /etc/sv
|
||||||
- acpid
|
sys_svdir: /etc/runit/runsvdir/default/
|
||||||
- bluetoothd
|
|
||||||
- crond
|
|
||||||
- dbus
|
|
||||||
- dhcpcd
|
|
||||||
- docker
|
|
||||||
- iwd
|
|
||||||
- ntpd
|
|
||||||
- rundird
|
|
||||||
- seatd
|
|
||||||
- socklog-unix
|
|
||||||
- tlp
|
|
||||||
include:
|
include:
|
||||||
- "common"
|
- "common"
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- elogind
|
- elogind
|
||||||
- libc_locales
|
- libc_locales
|
||||||
- runit_services
|
- runit_services
|
||||||
|
- runit_services_enable
|
||||||
|
|
||||||
artixlinux:
|
artixlinux:
|
||||||
include:
|
include:
|
||||||
|
@ -198,7 +188,20 @@ dotfiles:
|
||||||
runit_services:
|
runit_services:
|
||||||
src: runit_sv
|
src: runit_sv
|
||||||
dst: /etc/runit/sv
|
dst: /etc/runit/sv
|
||||||
|
|
||||||
|
runit_services_enable:
|
||||||
|
src:
|
||||||
|
dst:
|
||||||
actions:
|
actions:
|
||||||
- enable_runit_services
|
- enable_runit_services acpid
|
||||||
|
- enable_runit_services bluetoothd
|
||||||
|
- enable_runit_services crond
|
||||||
|
- enable_runit_services dbus
|
||||||
|
- enable_runit_services dhcpcd
|
||||||
|
- enable_runit_services docker
|
||||||
|
- enable_runit_services iwd
|
||||||
|
- enable_runit_services ntpd
|
||||||
|
- enable_runit_services rundird
|
||||||
|
- enable_runit_services seatd
|
||||||
|
- enable_runit_services socklog-unix
|
||||||
|
- enable_runit_services tlp
|
||||||
|
|
Reference in New Issue