diff --git a/scripts/Arch/OS/setup.fish b/scripts/Arch/OS/setup.fish index 30ac8826..115e4da4 100755 --- a/scripts/Arch/OS/setup.fish +++ b/scripts/Arch/OS/setup.fish @@ -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 diff --git a/scripts/Common/OS/setup.fish b/scripts/Common/OS/setup.fish index c7e2a5a5..4d524def 100755 --- a/scripts/Common/OS/setup.fish +++ b/scripts/Common/OS/setup.fish @@ -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"