install_apt_packages() {
    apt install         \
        bash-completion \
        build-essential \
        cowsay          \
        curl            \
        dos2unix        \
        emacs           \
        fortune-mod     \
        git             \
        gnupg           \
        pandoc          \
        pass            \
        python3-pip     \
        python3-venv    \
        rsync           \
        screen          \
        shellcheck      \
        tree            \
        vim             \
        wget            \
        ;
}


install_apt_packages_docker() {
    apt install         \
        ca-certificates \
        curl            \
        gnupg           \
        lsb-release     \
        ;
}


install_apt_packages_pyenv() {
    apt install         \
        libsqlite3-dev  \
        libbz2-dev      \
        libreadline-dev \
        libssl-dev      \
        zlib1g-dev      \
        ;
}


install_apt_packages_python_ldap() {
    apt install         \
        libldap2-dev    \
        libsasl2-dev    \
        ;
}


install_apt_packages_mailco() {
    apt install         \
        abook           \
        irssi           \
        isync           \
        msmtp           \
        mutt            \
        notmuch         \
        w3m             \
        ;
}


install_apt_packages_gui() {
    apt install         \
        cups            \
        firefox-esr     \
        gimp            \
        libreoffice     \
        libxcb-cursor0  \
        openconnect     \
        qtpass          \
        remmina         \
        vlc             \
        ;
}


install_apt_packages_fonts() {
    apt install         \
        fonts-firacode  \
        fonts-symbola   \
        ;
}


install_apt_packages_games() {
    apt install         \
        hedgewars       \
        ;
}


_check_package() {
    hash "${1}" >/dev/null 2>&1 || echo "${1} missing: ${2}"
}


check_additional_packages() {
    echo "Checking manually managed packages..."
    _check_package docker https://docs.docker.com/engine/install/debian/#install-using-the-repository
    _check_package poetry https://github.com/python-poetry/poetry
    _check_package pyenv https://github.com/pyenv/pyenv
    _check_package starship https://starship.rs
    #shellcheck disable=SC1090
    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
        command -v nvm 1>/dev/null || \
            echo "nvm missing: https://nvm.sh"
}
