use resholve

This commit is contained in:
xenia 2024-11-29 01:40:48 -05:00
parent 605365998b
commit e677a8a19d
1 changed files with 51 additions and 44 deletions

View File

@ -6,6 +6,8 @@
writeText,
writeShellApplication,
resholve,
bash,
cacert,
coreutils,
@ -44,12 +46,18 @@
pacman_conf = concatText "pacman.conf" [ "${pacman}/etc/pacman.conf" pacman_conf_in ];
bootstrap = writeShellApplication {
name = "archlinux-bootstrap";
bootstrap = resholve.writeScriptBin "archlinux-bootstrap" {
interpreter = "${bash}/bin/bash";
inputs = [ coreutils pacman systemd ];
execer = [
"cannot:${pacman}/bin/pacman-key"
"cannot:${systemd}/bin/systemd-nspawn"
];
} ''
set -o errexit
set -o nounset
set -o pipefail
runtimeInputs = [ coreutils pacman systemd ];
text = ''
if [ $# -lt 1 ]; then
echo "usage: $0 [directory] [pkgs ...]"
exit 1
@ -98,5 +106,4 @@
echo "Boot system:"
echo " sudo systemd-nspawn -bUD \"$newroot\""
'';
};
}