Add a function for initializing the OS
This commit is contained in:
parent
53c35a5742
commit
8b2d6a8a6a
2 changed files with 19 additions and 13 deletions
|
@ -23,6 +23,23 @@ begin
|
||||||
echo "$dir/install.fish"
|
echo "$dir/install.fish"
|
||||||
end
|
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
|
function setupOS -S -V dir -S
|
||||||
source "$dir/../../lib/hooks.fish"
|
source "$dir/../../lib/hooks.fish"
|
||||||
source "$dir/../../lib/wait-network.fish"
|
source "$dir/../../lib/wait-network.fish"
|
||||||
|
@ -40,18 +57,6 @@ begin
|
||||||
timedatectl set-timezone "$timezone"
|
timedatectl set-timezone "$timezone"
|
||||||
end
|
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 genfstab -U "$mountDir" >>"$mountDir/etc/fstab"
|
||||||
and arch-chroot "$mountDir" systemctl enable NetworkManager
|
and arch-chroot "$mountDir" systemctl enable NetworkManager
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,10 @@ function runSetup
|
||||||
|
|
||||||
and echo "Cloning project..."
|
and echo "Cloning project..."
|
||||||
and source "$dir/../../lib/copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
|
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 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 --force bootstrapSetup "Please set up a function `bootstrapSetup` for installing `fish` into the "
|
||||||
|
and runHook setupOS
|
||||||
|
|
||||||
and echo "Preparing auto-login..."
|
and echo "Preparing auto-login..."
|
||||||
and runHook --force autologin "Please set up a function `autologin` for setting up autologin for the `root` user"
|
and runHook --force autologin "Please set up a function `autologin` for setting up autologin for the `root` user"
|
||||||
|
|
Loading…
Reference in a new issue