Remove nix-shell shebang from autostart-manage

This commit is contained in:
Tobias Reisinger 2023-02-03 00:13:20 +01:00
parent 1458d5b334
commit cee6671913
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 8 additions and 7 deletions

View file

@ -1,6 +1,4 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p dasel hostname
# shellcheck shell=bash
#!/usr/bin/env bash
_systemctl () {
systemctl --user "${@:2}" "autostart@$1.service"
@ -61,8 +59,10 @@ _autostart_manage_enable_all () {
}
_get_autostart_cmd () {
hostname=$(cat /proc/sys/kernel/hostname)
selector_base="all()"
selector_host="all().filter(equal(type(),object)).filter(equal(key(),$(hostname))).all()"
selector_host="all().filter(equal(type(),object)).filter(equal(key(),$hostname)).all()"
selector_entry="filter(not(equal(type(),object))).filter(equal(key(),$1))"
cmd=$(_dasel "$selector_base.$selector_entry")
cmd_local=$(_dasel "$selector_host.$selector_entry")