use resholve
This commit is contained in:
parent
605365998b
commit
e677a8a19d
|
@ -6,6 +6,8 @@
|
||||||
writeText,
|
writeText,
|
||||||
writeShellApplication,
|
writeShellApplication,
|
||||||
|
|
||||||
|
resholve,
|
||||||
|
|
||||||
bash,
|
bash,
|
||||||
cacert,
|
cacert,
|
||||||
coreutils,
|
coreutils,
|
||||||
|
@ -44,12 +46,18 @@
|
||||||
|
|
||||||
pacman_conf = concatText "pacman.conf" [ "${pacman}/etc/pacman.conf" pacman_conf_in ];
|
pacman_conf = concatText "pacman.conf" [ "${pacman}/etc/pacman.conf" pacman_conf_in ];
|
||||||
|
|
||||||
bootstrap = writeShellApplication {
|
bootstrap = resholve.writeScriptBin "archlinux-bootstrap" {
|
||||||
name = "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
|
if [ $# -lt 1 ]; then
|
||||||
echo "usage: $0 [directory] [pkgs ...]"
|
echo "usage: $0 [directory] [pkgs ...]"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -98,5 +106,4 @@
|
||||||
echo "Boot system:"
|
echo "Boot system:"
|
||||||
echo " sudo systemd-nspawn -bUD \"$newroot\""
|
echo " sudo systemd-nspawn -bUD \"$newroot\""
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue