#!/bin/env fish
begin
    set -l dir (status dirname)
    source "$dir/../../lib/software.fish"

    function installSW
        yayinst \
            openssh \
            libfido2
    end

    function configureSW
        sudo systemctl --global enable ssh-agent

        and begin
            printf %s\n \
                "#!/bin/bash" \
                'export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"'
        end | sudo tee "/etc/profile.d/openssh.sh" >/dev/null
    end

    runInstaller $argv
end