Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e17b84f4a0 | |||
4718c88229 | |||
d1ddaaf06a
|
@@ -19,6 +19,12 @@ rootfs:
|
||||
s6: []
|
||||
|
||||
# optional
|
||||
# livefs:
|
||||
# packages: []
|
||||
livefs:
|
||||
packages: []
|
||||
# optional
|
||||
packages-init:
|
||||
dinit: []
|
||||
openrc: []
|
||||
runit: []
|
||||
s6: []
|
||||
|
||||
|
@@ -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,12 +53,14 @@ load_pkgs(){
|
||||
|
||||
local common_base
|
||||
local common_apps
|
||||
local common_misc
|
||||
local common_xorg
|
||||
local common_boot
|
||||
local common_init
|
||||
local packages_root
|
||||
local packages_live
|
||||
local packages_root_init
|
||||
local packages_live_init
|
||||
|
||||
local common_key_init=".packages-init.${INITSYS}[]"
|
||||
local root_key_init=".rootfs.packages-init.${INITSYS}[]"
|
||||
@@ -83,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"
|
||||
@@ -97,20 +104,22 @@ load_pkgs(){
|
||||
"${common_apps[@]}"
|
||||
"${packages_root[@]}"
|
||||
"${packages_root_init[@]}"
|
||||
"${common_xorg[@]}"
|
||||
"${common_misc[@]}"
|
||||
)
|
||||
|
||||
if "${HAS_LIVE}"; then
|
||||
packages+=(
|
||||
"${common_xorg}"
|
||||
)
|
||||
fi
|
||||
;;
|
||||
livefs)
|
||||
msg2 "Loading Packages: [%s] ..." "livefs.packages"
|
||||
mapfile -t packages_live < <(yq -P '.livefs.packages[]' "$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[@]}"
|
||||
"${packages_live_init[@]}"
|
||||
)
|
||||
;;
|
||||
bootfs)
|
||||
|
Reference in New Issue
Block a user