2024-07-09 00:22:12 +00:00
|
|
|
#!/bin/env fish
|
2024-07-20 12:03:35 +00:00
|
|
|
function isConfigured -S
|
|
|
|
set -q "$CONFIG_MODULE"
|
|
|
|
end
|
|
|
|
|
2024-07-09 00:22:12 +00:00
|
|
|
function getConfig -S -a property
|
2024-07-09 02:00:26 +00:00
|
|
|
source "$(status dirname)/eval-module.fish"
|
2024-07-09 00:22:12 +00:00
|
|
|
evalModule "$CONFIG_MODULE" "$property" $argv[2..]
|
|
|
|
end
|
2024-07-15 10:10:06 +00:00
|
|
|
|
2024-07-20 01:50:38 +00:00
|
|
|
function getUsers -S
|
|
|
|
getConfig valhalla.users --apply "builtins.attrNames" --json
|
|
|
|
end
|
|
|
|
|
2024-07-15 12:14:07 +00:00
|
|
|
function isSet -S -a property
|
|
|
|
not test "$(getConfig "$property" --json)" = "null"
|
|
|
|
end
|
|
|
|
|
2024-07-15 10:10:06 +00:00
|
|
|
function collectionActive -S -a name
|
|
|
|
[ "$(getConfig "valhalla.software.$name" --json)" = "true" ]
|
|
|
|
end
|