Create function for bootstrapping dependencies

This commit is contained in:
Manuel Thalmann 2024-12-05 09:25:52 +01:00
parent 254504f91b
commit 092ae9621b
4 changed files with 10 additions and 8 deletions

View file

@ -1,12 +1,7 @@
#!/bin/env fish #!/bin/env fish
begin begin
set -l dir (status dirname) set -l dir (status dirname)
source "$dir/../lib/dependencies.fish"
function installValhallaDeps -V dir
source "$dir/../lib/software.fish"
and pacinst fish git jq nix sudo tmux
sudo systemctl enable --now nix-daemon
end
function getDeploymentScript -V dir function getDeploymentScript -V dir
echo "$dir/../lib/deploy.fish" echo "$dir/../lib/deploy.fish"

View file

@ -1,6 +1,7 @@
#!/bin/env fish #!/bin/env fish
begin begin
set -l dir (status dirname) set -l dir (status dirname)
source "$dir/../lib/dependencies.fish"
source "$dir/../../Common/OS/setup.fish" source "$dir/../../Common/OS/setup.fish"
source "$dir/../../lib/settings.fish" source "$dir/../../lib/settings.fish"
@ -8,8 +9,8 @@ begin
arch-chroot $argv arch-chroot $argv
end end
function installValhallaDeps -S function bootstrapSetup -S
pacstrap -K "$mountDir" fish git jq nix sudo tmux pacstrap -K "$mountDir" fish
end end
function installDrivers -S function installDrivers -S

View file

@ -0,0 +1,5 @@
function installValhallaDeps -V dir
source "$dir/../lib/software.fish"
and pacinst fish git jq nix sudo tmux
sudo systemctl enable --now nix-daemon
end

View file

@ -51,6 +51,7 @@ 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"
runChroot "$mountDir" git config --system --add safe.directory "$PROJECT_CLONE_ROOT" 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 runHook setupOS
and echo "Preparing auto-login..." and echo "Preparing auto-login..."