Add a hook for installing dependencies
This commit is contained in:
parent
6955a140f5
commit
20f45a5cc1
2 changed files with 12 additions and 0 deletions
|
@ -11,6 +11,10 @@ begin
|
||||||
arch-chroot $argv
|
arch-chroot $argv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function installValhallaDeps -V mountDir
|
||||||
|
pacstrap -K "$mountDir" fish jq nix tmux
|
||||||
|
end
|
||||||
|
|
||||||
function setupOS -S -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,6 +16,13 @@ function runSetup
|
||||||
end
|
end
|
||||||
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
|
function getCloneFile -S -a path
|
||||||
set -l relativeDir (realpath --relative-to "$projectRoot" "$dir")
|
set -l relativeDir (realpath --relative-to "$projectRoot" "$dir")
|
||||||
set -l relativePath (realpath --relative-to "$dir" "$path")
|
set -l relativePath (realpath --relative-to "$dir" "$path")
|
||||||
|
@ -47,6 +54,7 @@ function runSetup
|
||||||
cp -r "$channelDir" "$mountDir/$channelDir"
|
cp -r "$channelDir" "$mountDir/$channelDir"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
and runHook installValhallaDeps
|
||||||
and source "$dir/../../copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
|
and source "$dir/../../copy-repo.fish" "$mountDir$PROJECT_CLONE_ROOT"
|
||||||
and runHook setupOS || true
|
and runHook setupOS || true
|
||||||
and runHook autologin || true
|
and runHook autologin || true
|
||||||
|
|
Loading…
Reference in a new issue