#!/bin/env fish
begin
    set -l dir (status dirname)

    function installValhallaDeps -V dir
        source "$dir/../lib/software.fish"
        and pacinst fish git jq nix sudo tmux
    end

    function getDeploymentScript -V dir
        echo "$dir/../lib/deploy.fish"
    end

    function initialize -V dir
        source "$dir/../../lib/wait-network.fish"
        waitNetwork
        or exit

        sudo systemctl enable --now nix-daemon
        and source "$dir/../lib/software.fish"
        and source "$dir/../Software/base-devel/main.fish"
        and source "$dir/../Software/pacman/main.fish"
        and source "$dir/../Software/yay/main.fish"

        and source "$dir/../Software/powershell/main.fish" --force

        and yayinst \
            linux-headers \
            pacman-contrib \
            yq
    end

    source "$dir/../../Common/OS/install.fish"
end