bootstrap.markdown @ 62e329839625 default tip

Merge
author Steve Losh <steve@stevelosh.com>
date Wed, 27 Aug 2025 16:19:24 -0400
parents 87ff0514c83b
children (none)
# Bootstrapping a New Machine

Notes for myself for the next time I set up a new laptop or whatever.

First, back up everything if necessary:

* Faster on wired ethernet.
* Don't forget password-store!
* Don't forget hidden dotfiles!

Install Debian.  Partition everything, install nothing.

Goal is now to get the dotfiles repo onto the machine and have everything
required to run `bootstrap.sh`.

Boot into a command line as root (no `sudo` yet):

    apt install sudo
    usermod -a -G sudo sjl
    usermod -a -G netdev sjl

Allow non-free packages:

    vim /etc/apt/sources.list

    edit to add non-free to lines, e.g.:
    deb http://http.us.debian.org/debian bookworm main contrib non-free

    apt update

Install first round of stuff:

    apt install \
        nmtui sudo make
        curl wget network-manager
        fish rlwrap
        mercurial git
        xcape
        pulseaudio alsa-utils
        libzstd-dev libx11-dev libxft-dev
        build-essential autoconf pkg-config
        bzip2 udisks2 lm-sensors htop
        fonts-ubuntu w3m atool psmisc
        suckless-tools trash-cli
        dunst neovim python3-dulwich
        silversearcher-ag
        irssi

TODO: `xautolock` is no longer in the Debian repos.  Figure out how to get it.

TODO: Need to disable networkd, remove interface from `/etc/interfaces` and
restart `NetworkManager` to get that in place.

Set up `.ssh` and keys.

Bootstrap lisp:

    sudo apt install sbcl
    git clone https://github.com/sbcl/sbcl
    git checkout sbcl-2.3.6
    SBCL_MAKE_JOBS=-j8 SBCL_MAKE_PARALLEL=8 sh make.sh --with-core-compression
    sudo sh install.sh
    sudo apt remove sbcl

    curl -O https://beta.quicklisp.org/quicklisp.lisp
    sbcl --load quicklisp.lisp
    (quicklisp-quickstart:install :path "/home/sjl/.quicklisp/")

    TODO CCL and others

Get dotfiles:

    hg clone ssh://hsl/repos/dotfiles
    cd dotfiles
    ./bin/bootstrap.sh

    TODO build hg from scratch to get hg-git working maybe
    TODO bootstrap script might fuck up the fish config because shit's already created, thanks a lot fish

    git clone https://github.com/sjl/z-fish

`chsh` to `/usr/bin/fish`

Clone repos:

    hg clone hsl://adopt adopt
    cd adopt
    llp
    cd ..

    hg-clone-llp for lisp

    others:

    1am
    adopt
    beast
    bobbin
    boots
    cacl
    chancery
    cl-d-api
    cl-digraph
    cl-losh
    cl-netpbm
    cl-pcg
    conserve
    d
    dbvolve
    docs.stevelosh.com
    friendly-find
    jarl
    peat
    t

    …etc etc


Build st:

    git clone https://github.com/sjl/st

Get a desktop environment up and running:

    sudo apt install xinit xdm

    git clone https://github.com/stumpwm/stumpwm

    (ql:quickload "clx")
    (ql:quickload "cl-ppcre")
    (ql:quickload "alexandria")
    (ql:quickload "xembed")

    ./autogen.sh
    ./configure
    make
    sudo make install

    cd ~/.stumpwm.d/
    git clone https://github.com/sjl/stumpwm-contrib modules
    cd modules
    git co sjl

Set up `pass`:

    git clone sjl@redacted:password-store .password-store
    sudo apt install pass scdaemon pinentry-gtk2
    gpg -a --export 5D... > public-key.txt
    copy over
    gpg --import < public-key.txt

Pulseaudio crap:

    sudo apt install pulseaudio alsa-utils
    pulseaudio --start
    alsamixer
    (m to unmute, up/down to change vol)

Set up Firefox:

    wget 'https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US'
    aunpack fi…
    mv firefox /opt/
    cd /opt/
    chown -R root:root firefox
    ln -s /opt/firefox/firefox /usr/local/bin/firefox 
    sudo apt install libgtk-3-0 libdbus-glib-1-2
    finish the rest of this garbage https://wiki.debian.org/Firefox#Hardware_Video_Acceleration

VLC (installs the world, sigh):

    sudo apt install vlc
    View > Docked Playlist to unbreak the playlist

UM VPN:

    TODO