Warning
Use at your own risk. I am updating this repository continuously, and much stuff will not work for you as I inject data (such as secrets, configs I want to protect, etc) only at runtime or during the build process. However, parts of the configuration can be useful to people (I hope), even if it is tailored to my (sometimes very specific) needs.
Supports quake terminals:
- Channel: NixOS unstable
- Package Manager:
nix - Window Manager:
hyprland - Bar:
waybar - Layered Keyboard Mapping:
kanata - Launcher:
rofi - GTK Theme:
Orchis Black - GTK Icon Theme:
Papirus Dark - Terminal:
ghostty - Multiplexer:
tmux - Shell:
fish - Editor:
neovim - Prompt:
starship - Audio:
pipewire,mpd,ncmpcpp - Fonts: Monaspace Nerd Fonts (Monaspice)
NOTE: the entire setup is optimized for shortcuts to be nice with a Colemak Mod-DH setup. Specifically I am running the following setup: https://github.com/f4z3r/zmk-config-piantor-bt
My workflow runs around the following principles:
- On the most top level I work with Hyperland as the window manager. Its alt-key is
altand the focus is to reach workspaces with a single keystroke. On that level,rofiservers as a launcher and interface by which other applications can be triggered using shortcuts.sofaservers me quite well there. - One level down,
ghosttywithfishintmuxshould allow me to jump as quickly between projects as possible. I want to at be able to jump between two different projects as fast as possible. Here the alt-key iscontrol.televisionplays a role as a selection engine/fuzzy finder. - On the lowest level,
nvimis used to navigate within projects. It serves both as a file manager and editor. Heregrappleis used to move quickly between bookmarked files,marksare used to jump within a file, andtelevisionis again used as a picker. Finallyexecutoris used as a minimal task runner. All other dependencies are only used for visual niceties. Plugins providing additional functionality are avoided if possible.
# update channels
sudo nix-channel --update
# update flake lock file
nix flake update
# OR update only a single input
nix flake update nixpkgs-master
# rebuild system (impure needed due to external credentials for rclone)
sudo nixos-rebuild switch --impure --flake .#Themes cannot be implemented fully dynamically, as Nix's filesystems are read-only. Instead, you can
choose to switch between themes (dark or light) in ./flake.nix and rebuild. You will need to
reload the tmux configurations if a tmux instance is already running:
:source ~/.config/tmux/tmux.confThis also supports a fast switch of a theme that does not require rebuilding the configuration. For
this simply run light in any fish shell to swich the following applications to light theme:
- nvim
- ghostty
- fish
- tmux
Ghostty will not reload the configuration automatically. This can be triggered by pressing ctrl-..
The override can be cleared using clight.
This repository also contains a Docker image definition with a part of the setup. This can be built with:
nix build .#dev-image
docker load < resultThe image is defined in docker.nix.
You can then run the image:
docker run \
-v ./:/home/f4z3r/workspace/ \
-it \
ghcr.io/f4z3r/dev-environment:latestBuilding a new image is done by adding a tag. Ensure that the tag is applied to a commit that
actually modifies the image and is the latest commit on master.
See docs/bootstrap.md.
ClamAV should be instantiated and installed by default. In order to set up the folder for the quarantine, run the following:
sudo mkdir -p /root/quarantine
# needed to run once or the service will fail
sudo freshclamDownload the secrets.nix file from the encrypted storage. For security reasons this file is
expected not to be in the build context. It should be placed under
/home/f4z3r/opt/system/secrets/secrets.nix. A symlink is then placed in the repo root. This avoids
leaking it if the file is commited as it needs to be staged to build. A git hook will stillprevent
committing the secerts.nix symlink in the build context.
On top of that, some secrets such as a Brave search API key and OpenRouter key are put under
~/.config/f4z3r/secrets.fish:
set -gx OPENROUTER_API_KEY '...'
set -gx BRAVE_API_KEY '...'Configure a rclone backend named gdrive. Store the rclone configuration under:
# can be found on proton drive
# ! do not use the same config as for sb sync actions, as that one is encrypted for additional
# protection !
/etc/nixos/rclone.confRclone is setup to sync the second brain between devices with an alias. In order to allow a simple
sync without having to trust google to not eavesdrop, all files within the second brain are passed
via the crypt encryption layer from Rclone before syncing. Both encryption and salt are protected
by 512bit passphrases. The encrypted configuration can be found in the proton drive.
# copy from the proton drive to local and change premissions
sudo chmod 600 ~/.config/rclone/rclone.conf
# check that there are at least the following backends configured:
# - gdrive (used by restic directly, restic does encryption as well)
# - gdrive-crypt (used by to sync the second brain between devices, with rclone encryption layer)
rclone configOnce this is done, you can perform an initial sync using:
# you can also run with --dry-run first to check if the output matches your expectations
rclone bisync gdrive-crypt:/ ~/notes \
--remove-empty-dirs \
--exclude '/.**' \
--exclude '**/.**' \
--exclude '**/tags' \
--compare size,modtime \
-MP --fix-case \
--conflict-suffix upstream,local \
--resyncAfter which you can use ns to sync notes.
The above rlcone command can also be used when rclone runs into a larger issue and requires a resync.
ATTENTION: if the source of truth is your local copy, switch out the two targets in the above command.
This repository provides a Helm chart to deploy a containerized setup of this NixOS configuration
into a Kubernetes/OpenShift cluster. This allows executing into the Pod and then have a fully
featured development environment. The Helm chart can be found under chart/.