Add a function for initializing the OS
This commit is contained in:
parent
51ac9da58d
commit
459ad49386
2 changed files with 19 additions and 13 deletions
|
@ -23,6 +23,23 @@ begin
|
|||
echo "$dir/install.fish"
|
||||
end
|
||||
|
||||
function initOS -V dir
|
||||
source "$dir/../../lib/wait-network.fish"
|
||||
|
||||
waitNetwork
|
||||
and pacman-key --init
|
||||
and pacman-key --populate
|
||||
|
||||
and pacstrap -K "$mountDir" \
|
||||
base \
|
||||
linux \
|
||||
linux-firmware \
|
||||
networkmanager \
|
||||
man-db \
|
||||
man-pages \
|
||||
texinfo
|
||||
end
|
||||
|
||||
function setupOS -S -V dir -S
|
||||
source "$dir/../../lib/hooks.fish"
|
||||
source "$dir/../../lib/wait-network.fish"
|
||||
|
@ -40,18 +57,6 @@ begin
|
|||
timedatectl set-timezone "$timezone"
|
||||
end
|
||||
|
||||
and pacman-key --init
|
||||
and pacman-key --populate
|
||||
|
||||
and pacstrap -K "$mountDir" \
|
||||
base \
|
||||
linux \
|
||||
linux-firmware \
|
||||
networkmanager \
|
||||
man-db \
|
||||
man-pages \
|
||||
texinfo
|
||||
|
||||
and genfstab -U "$mountDir" >>"$mountDir/etc/fstab"
|
||||
and arch-chroot "$mountDir" systemctl enable NetworkManager
|
||||
|
||||
|
|
|
@ -59,9 +59,10 @@ function runSetup
|
|||
|
||||
and echo "Cloning project..."
|
||||
and source "$dir/../../lib/copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
|
||||
and runHook setupOS
|
||||
and runHook initOS "Please set up a function `initOS` for initializing the mounted OS"
|
||||
and runChroot "$mountDir" git config --system --add safe.directory "$PROJECT_CLONE_ROOT"
|
||||
and runHook --force bootstrapSetup "Please set up a function `bootstrapSetup` for installing `fish` into the "
|
||||
and runHook setupOS
|
||||
|
||||
and echo "Preparing auto-login..."
|
||||
and runHook --force autologin "Please set up a function `autologin` for setting up autologin for the `root` user"
|
||||
|
|
Loading…
Reference in a new issue