Add a hook for installing dependencies

This commit is contained in:
Manuel Thalmann 2024-07-16 22:16:21 +02:00
parent 6955a140f5
commit 20f45a5cc1
2 changed files with 12 additions and 0 deletions

View file

@ -11,6 +11,10 @@ begin
arch-chroot $argv
end
function installValhallaDeps -V mountDir
pacstrap -K "$mountDir" fish jq nix tmux
end
function setupOS -S -V dir -V CONFIG_MODULE -V mountDir
source "$dir/../../Common/Scripts/hooks.fish"
source "$dir/../../Common/Scripts/wait-network.fish"

View file

@ -16,6 +16,13 @@ function runSetup
end
end
if not type -q installValhallaDeps
function installValhallaDeps
echo 'Please set up the hook `installValhallaDeps` for installing `fish`, `nix` and `tmux`.'
exit 1
end
end
function getCloneFile -S -a path
set -l relativeDir (realpath --relative-to "$projectRoot" "$dir")
set -l relativePath (realpath --relative-to "$dir" "$path")
@ -47,6 +54,7 @@ function runSetup
cp -r "$channelDir" "$mountDir/$channelDir"
end
and runHook installValhallaDeps
and source "$dir/../../copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
and runHook setupOS || true
and runHook autologin || true