Skip to content

Instantly share code, notes, and snippets.

@amtoine
Last active April 13, 2023 16:35
Show Gist options
  • Save amtoine/9384a03b428edbd85324e6f8ac099a58 to your computer and use it in GitHub Desktop.
Save amtoine/9384a03b428edbd85324e6f8ac099a58 to your computer and use it in GitHub Desktop.
Some tips and observations on my journey on Ubuntu for my job

Some tips and observations on my journey on Ubuntu for my job

hellord πŸ‘‹ πŸ˜‹

a little introduction

on a daily basis, i use ArchLinux -even though i plan on moving to NixOS or Guix very soon to try out a hash-based reproducible distro 😏- with the goatfiles installed, which i created and maintain actively, to give me the best desktop experience for me 😌

Note
see the website above for more information or contact me

Note
in the following, let's assume ubuntu 20.04-LTS has been installed, the very standard ubuntu experience!

installing stuff

πŸ‘‰ INSTALL basic DEPENDENCIES:

> sudo apt install git build-essentials cmake bat curl  # to make our lives easier...
> cargo install vivid                                   # used by nushell later

install rust with the official rustup tool

Notes

πŸ‘‰ INSTALL the GOATFILES:

git clone --bare https://github.com/goatfiles/dotfiles <dotfiles>
alias cfg="/usr/bin/git --git-dir=<dotfiles> --work-tree=$HOME"
cfg reset --hard
cfg config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
  • run the following to disable delta: cfg config --global core.pager "batcat --color=always --style=plain"
  • apply the following to fix bash
diff --git a/.bashrc b/.bashrc
index c8285eb..4d6d0b0 100644
--- a/.bashrc
+++ b/.bashrc
@@ -117,7 +117,7 @@ plugins=(
   bashmarks
 )
 
-source "$OSH/oh-my-bash.sh"
+#source "$OSH/oh-my-bash.sh"
 
 
 #         ______                                               _____                        __  _
@@ -224,10 +224,10 @@ export WORKON_HOME="$XDG_DATA_HOME/virtualenvs"
 # where to put the binaries of virtualenvwrapper.
 export VIRTUALENVWRAPPER_HOOK_DIR="$WORKON_HOME"
 if [[ ! -d $WORKON_HOME ]]; then mkdir -p $WORKON_HOME; fi
-source $HOME/.local/bin/virtualenvwrapper.sh
+#source $HOME/.local/bin/virtualenvwrapper.sh
 
 # disable my broken capslock key.
-gxtcl -d -q
+#gxtcl -d -q
 
 # usage: extr <file>
 extr ()
@@ -256,10 +256,10 @@ extr ()
 }
 
 ## before prompt ###
-pokemon-colorscripts -r
+#pokemon-colorscripts -r
 
 ## the prompt ###
-eval "$(starship init bash)"
+#eval "$(starship init bash)"
 
 ## after prompt ###
 if [ -f /etc/bash.command-not-found ]; then
@@ -280,6 +280,6 @@ if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integr
 
 [ -f ~/.fzf.bash ] && source ~/.fzf.bash
 
-source /home/amtoine/.config/broot/launcher/bash/br
+#source /home/amtoine/.config/broot/launcher/bash/br
 
 eval $(ssh-agent -s)
  • apply the following to fix nushell
diff --git a/.config/nushell/env.nu b/.config/nushell/env.nu
index 17082cd..f144515 100644
--- a/.config/nushell/env.nu
+++ b/.config/nushell/env.nu
@@ -96,7 +96,7 @@ let-env MANPAGER = "sh -c 'col -bx | bat -l man -p'"
 # activates virtualenvwrapper to manage python virtual environments.
 let-env WORKON_HOME = ($env.XDG_DATA_HOME | path join "virtualenvs")
 
-let-env GHQ_ROOT = ($env.XDG_DATA_HOME | path join "ghq")
+let-env GHQ_ROOT = ($env.XDG_DATA_HOME | path join "gitstore")
 let-env GIT_REPOS_HOME = $env.GHQ_ROOT
 
 let-env QUICKEMU_HOME = ($env.XDG_DATA_HOME | path join "quickemu")
@@ -152,7 +152,7 @@ let-env IPFS_PATH = ($env.HOME | path join ".ipfs")
 #
 # By default, <nushell-config-dir>/scripts is added
 let-env NU_LIB_DIR = ($nu.config-path | path dirname | path join 'lib')
-let-env NU_SCRIPTS_REMOTE = "ssh://[email protected]/goatfiles/nu_scripts.git"
+let-env NU_SCRIPTS_REMOTE = "https://github.com/goatfiles/nu_scripts.git"
 let-env NU_SCRIPTS_DIR = ($env.GIT_REPOS_HOME | path join "github.com/goatfiles/nu_scripts")
 
 let-env NU_LIB_DIRS = [

πŸ‘‰ INSTALL neovim:

> sudo apt install libtool-bin gettext
> git clone https://github.com/neovim/neovim <neovim>
> cd <neovim>
> make CMAKE_BUILD_TYPE=RelWithDebInfo
> sudo make install

will install

> nvim --version | head -n 1
NVIM v0.9.0-dev-710+gef89f9fd4

πŸ‘‰ INSTALL alacritty:

from source with

> git clone https://github.com/alacritty/alacritty.git <alacritty>
> cd <alacritty>
> cargo install --path alacritty

πŸ‘‰ INSTALL fonts for alacritty:

> curl -fLo /tmp/Mononoki.zip https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/Mononoki.zip
> unzip /tmp/Mononoki.zip -d ~/.local/share/fonts
> fc-cache -fv

πŸ‘‰ INSTALL nushell:

from source with[

> git clone https://github.com/nushell/nushell.git <nushell>
> cd <nushell>
> cargo install --path .

πŸ‘‰ some things in the ubuntu settings, manually

  • change the background from the GOAT wallpapers
  • add alacritty -e nu to the shortcuts under super + enter

πŸ‘‰ INSTALL IPFS:

for my job, i had to install the go-implementation of IPFS, kubo, below is a single script to make that happen:

#!/usr/bin/env bash
#
# wrapper script to install the go implementation of IPFS, kubo:
# 
# > **Note**  
# > see
# >   - https://ipfs.tech/
# >   - https://github.com/ipfs/kubo
#
# this script will only work on linux, with distributions based on the `/usr/` model
#
# > **Warning**  
# > this might not work on distros such a NixOS or Guix...
#
# > **Note** 
# > see https://docs.ipfs.tech/install/command-line/#install-official-binary-distributions
# > under the "linux" tab, for the official procedure
#

VERSION="0.17.0"
ARCH="linux-amd64"

LOCAL_DIRECTORY="/tmp/kubo-install"

archive="kubo_v${VERSION}_${ARCH}.tar.gz"

mkdir -p "${LOCAL_DIRECTORY}"

wget "https://dist.ipfs.tech/kubo/v${VERSION}/${archive}" --output-document "${LOCAL_DIRECTORY}/${archive}"
tar -xvzf "${LOCAL_DIRECTORY}/$archive" --directory "${LOCAL_DIRECTORY}"
(
  cd "${LOCAL_DIRECTORY}/kubo"
  sudo bash install.sh
)

ipfs --version

things still broken...

  • the git repository manager: ghq
  • the git pager and diff viewer: delta
  • the global desktop experience of the GOAT files..., e.g. bspwm does not work fine at all and gnome is not even close from such a great tilling window manager 🀷

in the end...

almost everything works now, and i wrote this document to never forget about it in the case i need to do such a thing once more 😌

add a little animation to locate the mouse cursor

gsettings set org.gnome.desktop.interface locate-pointer true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment