Perform partitioning and repo-cloning in common setup
This commit is contained in:
parent
f39d703f06
commit
8715109e6e
2 changed files with 10 additions and 12 deletions
|
@ -6,7 +6,7 @@ begin
|
||||||
|
|
||||||
set -l mountDir (getConfig valhalla.partition.rootDir)
|
set -l mountDir (getConfig valhalla.partition.rootDir)
|
||||||
|
|
||||||
function setupOS -V dir -V CONFIG_MODULE -V mountDir
|
function setupOS -S -V dir -V CONFIG_MODULE -V mountDir
|
||||||
source "$dir/../../Common/Scripts/hooks.fish"
|
source "$dir/../../Common/Scripts/hooks.fish"
|
||||||
source "$dir/../../Common/Scripts/wait-network.fish"
|
source "$dir/../../Common/Scripts/wait-network.fish"
|
||||||
|
|
||||||
|
@ -16,11 +16,8 @@ begin
|
||||||
|
|
||||||
waitNetwork
|
waitNetwork
|
||||||
and begin
|
and begin
|
||||||
set -l projectRoot (realpath "$dir/../../..")
|
set -l relativeDir (realpath --relative-to "$dir/../../.." "$dir")
|
||||||
set -l projectName (basename "$projectRoot")
|
set -l tempDir "$PROJECT_CLONE_ROOT/$relativeDir"
|
||||||
set -l relativeDir (realpath --relative-to "$projectRoot" "$dir")
|
|
||||||
set -l tempRoot "/opt/$(basename "$projectName")"
|
|
||||||
set -l tempDir "$tempRoot/$relativeDir"
|
|
||||||
|
|
||||||
if set -l keyMap (getConfig valhalla.keyMap)
|
if set -l keyMap (getConfig valhalla.keyMap)
|
||||||
loadkeys "$keyMap"
|
loadkeys "$keyMap"
|
||||||
|
@ -30,8 +27,6 @@ begin
|
||||||
timedatectl set-timezone "$timezone"
|
timedatectl set-timezone "$timezone"
|
||||||
end
|
end
|
||||||
|
|
||||||
and CONFIG_MODULE=$CONFIG_MODULE bash "$dir/../../Common/OS/partition.sh"
|
|
||||||
|
|
||||||
and pacman-key --init
|
and pacman-key --init
|
||||||
and pacman-key --populate
|
and pacman-key --populate
|
||||||
|
|
||||||
|
@ -45,10 +40,7 @@ begin
|
||||||
texinfo
|
texinfo
|
||||||
|
|
||||||
and runHook installDrivers "Installing drivers…" || true
|
and runHook installDrivers "Installing drivers…" || true
|
||||||
|
|
||||||
and "$dir/../../copy-repo.fish" "$mountDir$tempRoot"
|
|
||||||
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
|
||||||
|
|
||||||
and if set -q timezone
|
and if set -q timezone
|
||||||
|
|
|
@ -5,7 +5,13 @@ begin
|
||||||
source "$dir/../Scripts/hooks.fish"
|
source "$dir/../Scripts/hooks.fish"
|
||||||
set -l name (getConfig valhalla.setupUser.name)
|
set -l name (getConfig valhalla.setupUser.name)
|
||||||
set -l mountDir (getConfig valhalla.partition.rootDir)
|
set -l mountDir (getConfig valhalla.partition.rootDir)
|
||||||
runHook setupOS || true
|
set -l projectRoot (realpath "$dir/../../..")
|
||||||
|
set -l projectName (basename "$projectRoot")
|
||||||
|
set -l PROJECT_CLONE_ROOT "/opt/$(basename "$projectName")"
|
||||||
|
|
||||||
|
CONFIG_MODULE=$CONFIG_MODULE bash "$dir/partition.sh"
|
||||||
|
and source "$dir/../../copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
|
||||||
|
and runHook setupOS || true
|
||||||
|
|
||||||
and runHook createUser || \
|
and runHook createUser || \
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in a new issue