Setting up another new computer and making it work like i like
This is very much not for everyone, as the first thing we’re doing is switching from Debian stable to Debian testing, and most everyone won’t be on Debian at all let alone a few steps towards the edge. But it’s a place of freedom and power!
We’re just going to do the whole thing as one long cut-and-paste into the terminal as much as possible.
But first, replace /etc/apt/sources.list
with this:
deb https://deb.debian.org/debian testing main contrib non-free
deb-src https://deb.debian.org/debian testing main contrib non-free
deb https://deb.debian.org/debian-security/ testing-security main contrib non-free
deb-src https://deb.debian.org/debian-security/ testing-security main contrib non-free
deb https://deb.debian.org/debian testing-updates main contrib non-free
deb-src https://deb.debian.org/debian testing-updates main contrib non-free
And install some key Gnome Extensions
Open the below in Firefox and install the Gnome extensions Firefox extension when prompted:
https://extensions.gnome.org/extension/779/clipboard-indicator/
Give yourself sudo
su -
usermod -aG sudo mlncn
exit
Log out and log back in again.
Now let’s get started!
sudo apt update
sudo apt install thunderbird
sudo apt-get install neovim
# We're going to need to get GnuCash at least from Flathub
sudo apt install flatpak
sudo apt install gnome-software-plugin-flatpak
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Note that a restart is required before adding apps with Flatpak.
Restart, and then continue:
flatpak install -y org.gnucash.GnuCash
flatpak install -y org.zulip.Zulip
flatpak install -y com.bitwarden.desktop
# Best application switcher/launcher
mkdir -p ~/.local/share/gnome-shell/extensions # only needed if this is the first extension you install
cd ~/.local/share/gnome-shell/extensions
git clone https://github.com/daniellandau/switcher.git switcher@landau.fi
# DDEV
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
sudo apt-get install docker-compose
sudo systemctl restart docker.service
# Get this from the Homebrew homepage, https://brew.sh/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
sudo apt-get install build-essential
brew install gcc
brew tap drud/ddev && brew install ddev
brew install ahoy
brew install diffr
mkcert -install
# Git configuration
git config --global user.email "ben@agaric.coop"
git config --global user.name "Benjamin Melançon"
git config --global pull.ff only
git config --global core.pager 'diffr | less -R'
git config --global interactive.difffilter diffr
# Pass Unix-like Password Store
sudo apt-get install pass
sudo apt-get install qtpass
curl -sSL github.com/passff/passff-host/releases/latest/download/install_host_app.sh | bash -s -- firefox
sudo apt-get install pinentry-qt
sudo apt install rng-tools
# The rest is pretty manual
# creating gpg key for pass password store generate secure gpg key
# https://stackoverflow.com/questions/28802525/unable-to-generate-gpg-keys-in-linux/28802831#28802831
# sudo rngd -r /dev/urandom
# i got: can't lock /var/run/rngd.pid, running daemon's pid may be 28400
# but it seems no one else ever has.
# https://www.thepolyglotdeveloper.com/2018/12/manage-passwords-gpg-command-line-pass/
# https://www.passwordstore.org/
# Install Atom
We don't install Atom via Flathub/flatpak because calling it from the command line doesn't work!
wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add - sudo sh -c ’echo “deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main” > /etc/apt/sources.list.d/atom.list' sudo apt-get update
sudo apt-get install atom
# Pomodoro Prompt
```bash
mkdir -p ~/Projects/agaric/python
cd ~/Projects/agaric/python
git clone git@gitlab.com:agaric/python/pomodoroprompt.git
git clone git@gitlab.com:agaric/python/parse-timelogs-for-upload.git
For more convenient command prompt:
Create file ``~/.local/bin/pomodoroprompt` with contents:
#!/bin/bash
# Helper to call our pomodoro script. We actually skip the & so we can end it
# with ctrl+c
python ~/Projects/agaric/python/pomodoroprompt/pomodoroprompt.py
Install venv and pip- and python, too!
sudo apt install python3-venv python3-pip
Make Python 3 the default
sudo su
update-alternatives –install /usr/bin/python python /usr/bin/python3 1
exit
python -m pip install –user -r requirements.txt
Get Raw Notes, secrets- next section makes this unneeded
cd ~/Projects/agaric/ git clone git@gitlab.com:agaric/raw-notes.git
mkdir -p ~/Projects/agaric/private cd ~/Projects/agaric/private git clone git@gitlab.com:agaric/private/secrets.git
## Get all projects
Create personal access token with API scopes `read_repository` and `read_api` at [gitlab.com/-/profile/personal_access_tokens](https://gitlab.com/-/profile/personal_access_tokens).
Replace COPYTOKENHERE below with your token.
`echo 'export GITLAB_TOKEN="COPYTOKENHERE"' >> ~/.bashrc`
And now:
pip install gitlabber
echo ’export GITLAB_URL=“https://gitlab.com/"' » ~/.bashrc echo ’export GITLABBER_FOLDER_NAMING=“path”’ » ~/.bashrc source ~/.bashrc gitlabber ~/Projects/
Mlncn personal projects
mkdir ~/Projects/mlncn cd ~/Projects/mlncn git clone git@gitlab.com:mlncn/scripts.git cd ~/Projects/mlncn/scripts echo " if [ -f ~/Projects/mlncn/scripts/.bash_custom ]; then . ~/Projects/mlncn/scripts/.bash_custom fi “» ~/.bashrc
NextCloud
sudo apt-get install nextcloud-desktop
Secure delete - See https://ostechnix.com/securely-permanently-delete-data-linux/
sudo apt-get install secure-delete
Needed the actual latest firefox, NOT "Firefox ESR":
https://www.linuxuprising.com/2019/12/how-to-install-latest-firefox-non-esr.html
To make application/window switching sensible (being able to switch just within a workplace, or across all workspaces), this answer was key:
https://unix.stackexchange.com/a/465685/171876
# Git Open (used with my 'gof' Git Open File script)
mkdir ~/Applications cd ~/Applications git clone git@github.com:paulirish/git-open.git ln -s ~/Applications/git-open/git-open ~/.local/bin/git-open