Mainly I structure my modules follow their paths starting from
$HOME. To activate the module, symlink the corresponding folder to
$HOME.
This task is done by GNU Stow.
stow <module>Not every module here can be stowed though.
Some distros I’m using for my personal machine:
I use Guix as my package manager, together with
the official package manager (i.e. Fedora’s dnf)
-
Stow
guixfirst. -
To make packages update effective:
guix home reconfigure ~/.config/guix/home-configuration.scm-
To describe generations:
guix home describeMainly used for installing the text editor (Emacs) and packages which I cannot simply install with Nix.
-
Use the
nix-installerfrom Determinate Systems to install Nix on Mac.
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install-
Install home-manager:
# with an unstable channel
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
# with a stable channel
nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-managernix-channel --update
nix-shell '<home-manager>' -A install-
Shell are not managed with
home-managerthough, for stability reason. -
Add nixpkgs channels:
nix-channel --add https://channels.nixos.org/nixpkgs-24.05-darwin nixpkgs
nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
nix-channel --update-
When you need to make change to the packages, edit
~/.config/home-manager/home.nixand:
home-manager switch-
stowis used when changes are made often: e.g.fish,vim. -
Otherwise, some modules are managed and symlinked with
home-manager. Check what modules are managed withhome-managerinhome-manager/home.nix:
home.file = {
...
}-
List generations:
home-manager generations-
Perform the rollback:
/nix/store/...-home-manager-generation/activateMy default shell is Zsh with Zim.
This dotfiles contains the universal configuration: stow zsh. It will put the
universal default configuration inside +/.config/zsh/zsh.sh.
Create custom file for each machine: ~/customs/zsh.sh.
After the installation of Zim, in your ~/.zhsrc:
# ------------------------------
# Fixed
# ------------------------------
[[ -f $HOME/.config/zsh/zsh.sh ]] && source $HOME/.config/zsh/zsh.sh
# ------------------------------
# Custom
# ------------------------------
[[ -f $HOME/customs/zsh.sh ]] && source $HOME/customs/zsh.shI decided to switch (and possibly contribute) to doom-emacs instead of writing my vanilla Emacs configurations.
Install:
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.emacs.d
~/.emacs.d/bin/doom installThen stow emacs.
I want to contribute and learn best practice from community, at least until I’m confident enough to maintain my own configurations.
My Doom Emacs’ configuration lives in emacs/.doom.d.
A lot of tools are installed with Python pip. I use
pyenv to manage my Python environments.
-
To configure
pyenvwith Fish shell:
set -Ux PYENV_ROOT $HOME/.pyenv
fish_add_path $PYENV_ROOT/bin
pyenv init - | source-
To install and use a Python version globally:
pyenv install 3.10
pyenv global <version>I use rbenv to manage my Ruby environments.
-
To configure
rbenvwith Fish shell:
fish_add_path $HOME/.rbenv/shims
status --is-interactive; and rbenv init - fish | source-
To install and use a Ruby version globally:
rbenv install 3.2.2
rbenv global <version>Below is an awesome list of themes done in style. All are eye-care themes.
-
I follow recommendations from Betterfox
-
Note that editing
about:configwon’t take effect if you haveuser.jsinside your profiles.user.jswill reset all of your changes when start a new browser. -
Mac:
ln -s $PWD/firefox/user.js "$HOME/Library/Application Support/Firefox/Profiles/"-
Linux:
ln -s $PWD/firefox/user.js (readlink -f (ls -d $HOME/.mozilla/firefox/*.default | head -n 1))/-
Go to Options > Filter Lists > Annoyances and turn on all of them. Optionally, you can turn on Cloud Storage sync (refer).
-
Some additional personal filters list:
accounts.google.com/gsi/iframe