Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

New computer setup

:ID: 944F1F58-4EC8-444C-B7CA-787ABC19025B

A got a new laptop, a System 76 Gazelle with pop_os. This was the first I time used my dotfiles to setup a Linux box. Previously, I always used MacOS. I want to keep track of the setup procedure, so next time I wont have to figure some of this shit out and maybe automate some of it too.

# Setup Git

I need my dotfiles so first thing is to get git configured.

# Generate SSH key pair

ssh-keygen -t ed25519 -C "Some Comment"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/myprivatekey

Explaining of the above commands:

  1. Generate the private/pub key pair
  2. Start ssh-agent
  3. Add the private key (ie, not the one with .pub) to ssh-agent

# Add SSH Pub key to GitHub account

Follow their instructions. But the gist of it is go to your account settings, add a new ssh-key and paste the contents of the .pub file.

# Clone dotfiles

# Create symlinks for git dotfiles

With the SSH key stuff out of the way, I cloned the dotfiles repo. After cloning the dotfiles repo create symlinks for:

  • .gitconfig
  • .gitignore_global
ln -s ~/dotfiles/git/gitconfig ~/.gitconfig
ln -s ~/dotfiles/git/gitignore_global ~/.gitignore_global

# Install ZSH

sudo apt-get-update
sudo apt-get install zsh
chsh -s $(which zsh)
sudo reboot

# Install ohmyzsh

# Create symlink for dotzsh file

ln -s ~/dotfiles/shell/zshrc ~/.zshrc

# Install fzf

# Install npm and yarn

# Nodesource (Linux)

# yarn

npm install yarn -g

# Install vim

# Create symlink for dotvimrc file

ln -s ~/dotfiles/vim/vimrc ~/.vimrc

# Install rbenv

# Install ruby-build

# Install a version of ruby

rbenv install -l # list most recent stable versions and pick one
rbenv install 3.2.2 # install it
rbenv global 3.2.2 # set it to global

# Install Emacs

Version 28 with native-comp

# Download source code for the version you want

# Or master branch

Clone the Emacs repo: https://git.savannah.gnu.org/git/emacs.git

To install a certain tagged version

  • git tag to list all available tags
  • checkout the version you want: git checkout emacs-29.3

# Dependencies I needed

Run the following to determine if you have the dependencies needed and create the configure file

./autogen.sh

There will probable be a lot of stuff missing. For example once…

I needed these:

sudo apt install gcc-10 libgccjit0 libgccjit-10-dev autoconf librsvg2-dev libpng-dev \
  libjpeg-dev imagemagick sqlite3 pandoc libcairo2-dev

But another time there was even more…

See this which was helpful. After install those, I was able to move on.

# Configure and install

Create a build directory

mkdir build && cd build

Run ../configure with the desired build flags, whatever they mean

To see all available build flags ./configure --help

This is how I configured and installed it when I installed v28

CC="gcc-10" ./configure --with-modules --with-cairo --with-imagemagick --with-rsvg --with-mailutils --with-native-compilation

And for v29:

../configure --with-native-compilation --with-json --with-xwidgets --with-mailutils CFLAGS="-O2 -march=native" CC="gcc-10"

Then install it

make -j 2
sudo make install

If using the same emacs repo from previous installs, there might be old .elc files from previous version installs. That will cause a problem. I’m not sure how to recompile them. Maybe the bootstrap command? Anyway deleting and re-cloning the repo works too.

See also https://www.masteringemacs.org/article/speed-up-emacs-libjansson-native-elisp-compilation

# Add chemacs2 and profiles

# Install spacemacs

# Install doom

# Install optional tools

# rclone

# syncthing

Search Results