My declarative, reproducible NixOS system built using Lix. My configuration is designed to support multiple hosts—including an Apple Silicon MacBook—and multiple users, some of whom are reused across different hosts. It also incorporates advanced features such as LUKS encryption via disko and secrets management with sops. I've aimed for a balance between readability and completeness.
Please follow my installation instructions in INSTALL.md.
If you set up a new machine you should probably generate a new SSH key pair. Put your keys in /home/thomas/.ssh/ once you're logged in in your new machine. Don't forget to set up a new password for your user using passwd.
Put your age keys here:
vim /home/thomas/.config/sops/age/keys.txtNow you are ready to clone this configuration. Update my user thomas with yours. Once you are ready, rebuild the system:
nixos-rebuild switch --flake .#host --sudo
# Or, better
nh os switch . -H hostTo rebuild a remote system locally, and deploy it:
nixos-rebuild switch --flake .#coprin --target-host thomas@192.168.1.30 --sudo
# Or, better
nh os switch . -H coprin --target-host thomas@coprin.localIf you run out of memory, add parameters --cores x and --max-jobs x to the build command.
This configuration supports multiple hosts as documented in hosts/README.md.
Some packages require manual configuration.
If you imported age keys, just login to retrieve your shell history:
atuin login
atuin syncJust open Obsidian, login and sync everything including community plugins and settings (Active community plugin list and Installed community plugins options). Wait for the end of the synchronization, and restart the app.
Connect your machine to your Tailscale network and authenticate in your browser:
sudo tailscale upIn Dolphin (or somewhere else), use smb://user@ip to connect to a remote SMB share.
Optimize the Nix store by hard linking duplicate binaries. This shouldn't be needed with my current dotfiles though, as optimizations are performed automatically at build time.
nix-store --optimiseThe Nix store accumulates entries which are no longer useful. They can be deleted:
nix-store --gcDelete all generations older than a specific period (e.g. 30 days):
nix-collect-garbage --delete-older-than 30dThese commands are run altogether when using:
nh clean all --keep-since 30dLimitations:
- (DNS4EU) I should find a way to enable DNSOverTLS with DNS4EU
- (librewolf) camera and screen share do not work on video calls
- (librewolf)
privacy.resistFingerprinting = trueprevents media upload and Leboncoin login from working. - (vscodium) VSCodium is unable to install extensions onto remotes
- (apptainer) can't build containers on btrfs systems
Unable to create build: failed to find mount point for /tmp: no parent mount point found
These are not fully integrated yet:
- SDDM doesn't offer a keyboard layout selection, which is very annoying for non-US keyboard users. SDDM should be incubated into Plasma at some point.
- Introduction to Nix and NixOS by Wil T
- I got some inspiration from geraldwuhoo
- NixOS Secrets Management by EmergentMind
- Flakes + Home Manager Multiuser/Multihost Configuration by Chris McDonough
- NixOS on Apple Silicon by sef
- Moving the store