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

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

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

        sudo systemctl enable --now nix-daemon
        and source "$dir/../Scripts/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"

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

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