Skip to content

David-Else/developer-workstation-setup-script-debian

Repository files navigation

Developer Workstation Setup Script Debian Edition

Debian_logo

This guide provides instructions for setting up a developer workstation using Debian 13 "Trixie". While the software and setup choices are mainly aimed towards developers, it is also suitable for general use.

Installation

Before running the playbook, follow these steps to install Debian:

Installing Debian 13

You can download the net installer from here:

https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/

Note

  • Do not provide any details for the root account; your user account will then have administrative rights.
  • Leave GNOME as the default desktop environment.
  • If you installed from a DVD ISO, use the Software & Updates application or the terminal to remove cdrom from /etc/apt/sources.list. Look in the Other Software tab: Software & Updates

Setting up Debian

  1. Open the terminal and run the following command to install Ansible, Git, and Flatpak:

    sudo apt install ansible git flatpak
  2. Clone this repository and navigate into it:

    git clone https://github.com/David-Else/developer-workstation-setup-script-debian
    cd developer-workstation-setup-script-debian
  3. Customize the software selection by modifying packages.yml according to your preferences.

  4. Run the main installation playbook:

    ansible-playbook ./install-playbook.yml -K

Note

When prompted for the BECOME password in Ansible, enter your user password. Your account must have administrative privileges.

You can add --check for a test run or --diff -vv to see more information.

  1. To enable the preview feature in the nnn file manager, run it once with the -a flag to create the FIFO file. Install the plugins using:

    sh -c "$(curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs)"
  2. Install showmethekey:

    cd extras
    unzip showmethekey-1.12.0-compiled.zip
    cd showmethekey-1.12.0
    sudo ./install-show-me-the-key.sh
  3. Install Firefox extensions:

    firefox https://addons.mozilla.org/en-GB/firefox/addon/ublock-origin/ \
        https://addons.mozilla.org/en-US/firefox/addon/surfingkeys_ff/ \
        https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser/ &
  4. Compile the tt terminal typing test from source:

    git clone https://github.com/lemnos/tt
    cd tt
    make && sudo make install
  5. Change the visudo editor to Vim:

    sudo update-alternatives --config editor
  6. Install Rust and AIChat:

    set -o pipefail &&
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y &&
    . "$HOME/.cargo/env" &&
    rustup component add rust-analyzer &&
    cargo install aichat --version 0.30.0 &&
    sudo cp ./extras/_aichat /usr/share/zsh/vendor-completions/
  7. Reboot the system:

    sudo reboot

Optional Tweaks

Depending on your software selection, hardware, and personal preferences, you may want to make the following changes:

Audio

Confirm that the allowed sample rate settings were changed by the playbook using:

pw-metadata -n settings

Monitor per-application sample rates dynamically with:

pw-top

Note

More information can be found at: docs.pipewire.org configuration-file-pipewireconf

General

To perform general tweaks, follow these steps:

  • Set Helix to open in Kitty by editing the desktop entry:

    sudoedit /usr/share/applications/Helix.desktop

    To open Helix in a standalone Kitty instance:

    Exec=kitty --single-instance hx %F
    Terminal=false

    Or to open Helix in a tab of an existing Kitty instance:

    Exec=open-in-kitty-helix %F
    Terminal=false

    Create the script open-in-kitty-helix:

    #!/bin/bash
    
    FILE="$1"
    
    # If no file is given, treat it as a "new file" with no path
    if [ -z "$FILE" ]; then
        FILE=""
        TITLE="New File"
    else
        TITLE="${FILE##*/}" # basename only
    fi
    
    # Find the first kitty socket in /tmp
    SOCKET_PATH=$(ls /tmp/kitty-* 2>/dev/null | head -1)
    
    # If no socket found, start kitty with hx
    if [ -z "$SOCKET_PATH" ]; then
        kitty hx "$FILE" &
        exit 0
    fi
    
    SOCKET="unix:$SOCKET_PATH"
    
    # Check if kitty is responsive
    if kitty @ --to "$SOCKET" ls >/dev/null 2>&1; then
        # Only check for duplicates if a real file is given
        if [ -n "$FILE" ]; then
            if kitty @ --to "$SOCKET" ls | grep -qF "$FILE"; then
                notify-send "File Already Open" "The file '$FILE' is already open."
                exit 1
            fi
            # Launch hx with the file
            kitty @ --to "$SOCKET" launch --type=tab --title="$TITLE" hx "$FILE"
        else
            # No file: launch hx with no arguments (so it doesn't open '.')
            kitty @ --to "$SOCKET" launch --type=tab --title="$TITLE" hx
        fi
    else
        # Stale socket, remove and start fresh
        rm -f "$SOCKET_PATH"
        if [ -n "$FILE" ]; then
            kitty hx "$FILE" &
        else
            kitty hx &
        fi
    fi

    Make the script executable:

    sudo cp open-in-kitty-helix /usr/local/bin/
    sudo chmod +x /usr/local/bin/open-in-kitty-helix
  • Install GitHub CLI extensions:

    gh extension install yusukebe/gh-markdown-preview
    gh extension install dlvhdr/gh-dash
    hx ~/.config/gh-dash/config.yml  # Set diff: "delta"
  • Install virtual video device support:

    sudo apt install v4l2loopback-dkms v4l2loopback-utils

FAQ

If you encounter a "no bootable device found" error after installing Debian, refer to: https://itsfoss.com/no-bootable-device-found-ubuntu/. In short, add shimx64.efi as a trusted EFI file to be executed.

Note

Bonus: If you are using Debian 13 as a virtual machine, spice-vdagent should be pre-installed. Verify it is running with:

sudo systemctl status spice-vdagent

Enable it at boot if necessary:

sudo systemctl enable spice-vdagent

About

Ansible playbook for Debian to create your ultimate development environment

Resources

Stars

Watchers

Forks

Packages

No packages published