![]() |
|---|
| NixOS + Niri in Wittgenstein (Framework 13) |
I was peer-pressured into using Nix. And I am glad I was; it turned out to be perfect for a control freak like me.
This repository is largely based on my original dotfiles.
Rather than a 1:1 port, I've used the Nix migration as an excuse to cut out unused tools and simplify my overall setup (e.g., swapping custom Lua code for mini.nvim modules, and turning my Zsh config into a stable login shell while moving features to Fish, which is my interactive shell in Kitty).
Note
My original dotfiles repository isn't dead. I will backport any major changes there. Because you never know when the urge to distrohop will strike again.
flake.nix takes 5 inputs:
nixpkgs-unstablenixos-hardwarenix-darwinhome-managernixvim
and produces 2 outputs
beauvoir: anix-darwinmodule for my M4 Mac Mini.wittgenstein: a NixOS module for my Framework 13.
I run make update in the flake-update-testing branch every 2 weeks or so.
Then I iron out any breaking changes and implement new features associated with the package update.
Once the system becomes stable, flake-update-testing is merged into main, and the cycle repeats.
See my NixOS Minimal Installation with LUKS Encryption Guide.
Since I have no display manager, you will be dropped into a TTY upon boot.
- Use
keychain_loadalias in Zsh to manually load SSH keys. I intentionally disabled Zsh integration to prevent blocking the login shell. Manual loading ensures the SSH agent is inherited by all child processes. - Use
niri-sessionto launch Niri alongside necessarysystemdservices (swayidle, Waybar, etc., managed via theniri.sessiontarget). - Set the wallpaper and generated a cached lockscreen image using
theo-set-wallpaper /path/to/any/image/that/is/accepted/in/imagemagick
hosts/wittgenstein/configuration.nix: core system definition. Handles hardware services (e.g., pipewire), user settings, and global environment variables. I offload as much as possible to home-manager.hosts/wittgenstein/idkwhattoname.nix: other system-level services and programs that require little to no configurations.hosts/wittgenstein/hardware-configuration.nix: (almost) auto-generated hardware configuration for Framework 13. Manually patched for LUKS compatibility and hibernation.
# Install Determinate Nix
curl -fsSL https://install.determinate.systems/nix | sh -s -- install
cd && git clone git@github.com:theopn/nix-conf.git
cd ~/nix-conf
nix run nix-darwin -- switch --flake .#beauvoir- Since I don't use a GUI wrapper, bookmark
http://127.0.0.1:8384/(Syncthing web UI).
hosts/beauvoir/configuration.nix: the primarynix-darwinconfiguration with macOS settings and global variables.hosts/beauvoir/homebrew.nix: Manages Homebrew Casks for GUI applications that don't benefit from declarative configuration or version locking (e.g., Slack, KiCad)hosts/beauvoir/aerospace.nix: a Nix translation of my Aerospace config
The Code is intended to be self-explanatory.
home-manager/home.nix: define user-level variables and imports cross-platform tools.home-manager/linux.nix: Linux-specific imports and services (e.g., imv, mpv, zathura, and Niri dependencies)home-manager/config: all individual config files for programs/services. All sub-directories house non-Nix config files. For example,home-manager/config/lfcontains the standardicons_coloreddefinition from the officiallfrepository.
TODO: insert screenshot
It is a simplified version of my previous Neovim setup.
- I am an advocate for Vim's native tab system and try to avoid "bufferline" plugins.
My
tabby.nvimconfig provides a nice middle ground between native tab system and a visible buffer list.
