Compare commits

...

4 Commits

Author SHA1 Message Date
e17b84f4a0 iso-fixes (#156)
All checks were successful
Artools shellcheck / lint (push) Successful in 25s
Reviewed-on: #156
Co-authored-by: Artoo <artoo@artixlinux.org>
Co-committed-by: Artoo <artoo@artixlinux.org>
2025-08-29 22:38:21 +02:00
4718c88229 Merge pull request 'buildiso: load optional livefs packages-init' (#155) from iso-opt-yaml-key into master
All checks were successful
Artools shellcheck / lint (push) Successful in 29s
Reviewed-on: #155
2025-08-28 00:55:17 +02:00
d1ddaaf06a buildiso: load optional livefs packages-init
All checks were successful
Artools shellcheck / lint (pull_request) Successful in 56s
2025-08-27 23:48:23 +02:00
9484fff9f8 buildiso: handle s6 DM in proper lib (#154)
All checks were successful
Artools shellcheck / lint (push) Successful in 1m14s
Reviewed-on: #154
Co-authored-by: Artoo <artoo@artixlinux.org>
Co-committed-by: Artoo <artoo@artixlinux.org>
2025-08-26 17:11:44 +02:00
3 changed files with 35 additions and 27 deletions

View File

@@ -19,10 +19,12 @@ rootfs:
s6: []
# optional
# livefs:
# packages: []
# packages-init:
# dinit: []
# openrc: []
# runit: []
# s6: []
livefs:
packages: []
# optional
packages-init:
dinit: []
openrc: []
runit: []
s6: []

View File

@@ -43,6 +43,8 @@ load_profile(){
HAS_LIVE=$(yq -P '. | has("livefs")' "$profile_yaml")
HAS_LIVE_INIT=$(yq -P '.livefs | has("packages-init")' "$profile_yaml")
return 0
}
@@ -51,6 +53,7 @@ load_pkgs(){
local common_base
local common_apps
local common_misc
local common_xorg
local common_boot
local common_init
@@ -70,12 +73,12 @@ load_pkgs(){
msg2 "Loading Packages: [%s] ..." "common.packages-base"
mapfile -t common_base < <(yq -P '.packages-base[]' "$common_yaml")
msg2 "Loading Packages: [%s] ..." "common.packages-apps"
mapfile -t common_apps < <(yq -P '.packages-apps[]' "$common_yaml")
msg2 "Loading Packages: [%s] ..." "common.packages-init.${INITSYS}"
mapfile -t common_init < <(common_key_init="$common_key_init" yq -P 'eval(strenv(common_key_init))' "$common_yaml")
msg2 "Loading Packages: [%s] ..." "common.packages-apps"
mapfile -t common_apps < <(yq -P '.packages-apps[]' "$common_yaml")
if "${HAS_LIVE}"; then
if ${USE_XLIBRE}; then
msg2 "Loading Packages: [%s] ..." "common.packages-xlibre"
@@ -84,6 +87,9 @@ load_pkgs(){
msg2 "Loading Packages: [%s] ..." "common.packages-xorg"
mapfile -t common_xorg < <(yq -P '.packages-xorg[]' "$common_yaml")
fi
msg2 "Loading Packages: [%s] ..." "common.packages-misc"
mapfile -t common_misc < <(yq -P '.packages-misc[]' "$common_yaml")
fi
msg2 "Loading Packages: [%s] ..." "rootfs.packages"
@@ -94,32 +100,22 @@ load_pkgs(){
packages+=(
"${common_base[@]}"
"${common_apps[@]}"
"${common_init[@]}"
"${common_apps[@]}"
"${packages_root[@]}"
"${packages_root_init[@]}"
"${common_xorg[@]}"
"${common_misc[@]}"
)
if "${HAS_LIVE}"; then
packages+=(
"${common_xorg}"
)
fi
for svc in "${SERVICES[@]}"; do
case "$svc" in
sddm|gdm|lightdm|mdm|greetd|lxdm|xdm)
display_manager="$svc"
;;
esac
done
;;
livefs)
msg2 "Loading Packages: [%s] ..." "livefs.packages"
mapfile -t packages_live < <(yq -P '.livefs.packages[]' "$profile_yaml")
msg2 "Loading Packages: [%s] ..." "livefs.packages-init.${INITSYS}"
mapfile -t packages_live_init < <(live_key_init="$live_key_init" yq -P 'eval(strenv(live_key_init))' "$profile_yaml")
if "${HAS_LIVE_INIT}"; then
msg2 "Loading Packages: [%s] ..." "livefs.packages-init.${INITSYS}"
mapfile -t packages_live_init < <(live_key_init="$live_key_init" yq -P 'eval(strenv(live_key_init))' "$profile_yaml")
fi
packages+=(
"${packages_live[@]}"

View File

@@ -45,7 +45,17 @@ add_svc_runit(){
add_svc_s6(){
local mnt="$1" rlvl="${2:-default}" dep
local display_manager
local supported_dms=(sddm gdm lightdm mdm greetd lxdm xdm)
for dm in "${supported_dms[@]}"; do
if in_array "$dm" "${SERVICES[@]}"; then
display_manager="$dm"
fi
done
dep="$mnt"/etc/s6/sv/"$display_manager"-srv/dependencies.d
for svc in "${SERVICES[@]}"; do
msg2 "Setting %s: [%s]" "${INITSYS}" "$svc"
if [[ -d "$mnt"/etc/s6/sv/"$svc" ]] || [[ -d "$mnt"/etc/s6/sv/"$svc"-srv ]]; then