Skip to content
rebizzzPublic

About

My nix config, because reinstalling linux 47 times taught me nothing until this

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

329 Commits

Folders and files

Repository files navigation

ReBiz's NixOS Config

Desktop preview

NixOS License: MIT

"Since I have unlimited time, I thought I could get to know you slowly.", Frieren

laptop ("Frieren", codenamed after the steadiest of Frieren's travelers) is a NixOS desktop with Umbriel + Noctalia on a tmpfs root wiped every reboot. See modules/hosts for details.

🔴 IMPORTANT: Don't deploy this flake directly on your own machine, it will not succeed. It contains my hardware configuration (disk layout, LUKS device paths, hostIds) and its secrets are encrypted to my personal age key. Use it as a reference for your own config, not a drop-in install.

Components

Category Choice
Compositor Umbriel
Shell / Bar Noctalia
Display Manager noctalia-greeter
Terminal kitty + Fish (zoxide, eza, bat, ripgrep)
Browser Brave Origin, debloated and locked down via policy
Filesystem Btrfs + LUKS + LVM
Secrets sops-nix + age
Containers Podman
Modules dendritic pattern via flake-parts + import-tree

Directory Structure

.
├── flake.nix    # Flake entrypoint (flake-parts + import-tree)
├── Justfile     # just --list for build/lint/deploy shortcuts
├── assets/      # Wallpapers and avatar image
├── secrets/     # sops-nix encrypted secrets, shared across hosts
└── modules/     # see modules/README.md
    ├── flake/   # flake-parts wiring: devShell
    ├── hosts/   # One directory per machine
    ├── system/  # NixOS modules (boot, hardware, services)
    └── home/    # Home Manager modules, laptop only

Files prefixed with _ (e.g. _host.nix, _disko.nix, _hardware.nix) are plain data/host modules. import-tree otherwise treats every .nix file under modules/ as a flake-parts module, so these are deliberately excluded from that auto-discovery and wired in explicitly instead. Each host also lists the exact set of modules it uses, see modules/hosts for why that's explicit rather than automatic.

Installing the Laptop

  1. Boot the NixOS installer and connect to Wi-Fi (iwctl).
  2. Clone the repo:
    nix-shell -p git -- git clone https://github.com/rebizzz/nixos /tmp/nixos
    cd /tmp/nixos
  3. Partition with Disko:
    sudo nix run github:nix-community/disko/latest -- --mode disko --flake .#laptop
  4. Copy the backup age key:
    sudo mkdir -p /mnt/persistent/etc/sops/age
    sudo cp /path/to/keys.txt /mnt/persistent/etc/sops/age/keys.txt
    sudo chmod 600 /mnt/persistent/etc/sops/age/keys.txt
  5. Install and reboot:
    sudo nixos-install --flake .#laptop --no-root-passwd
    sudo reboot

Day to day: just switch.

For a from-scratch install, see modules/hosts/README.md. For how secrets are managed, see secrets/README.md.

Development

direnv is enabled. Approve it once with direnv allow, and from then on cd-ing into the repo loads sops, age, and just automatically, no nix develop needed. The Justfile wraps formatting, linting, and switching:

just fmt      # alejandra
just lint     # deadnix + statix + nix flake check
just update   # nix flake update
just gc       # garbage collect old generations, system and user

Run just --list to see every recipe.


References

MIT licensed.

About

My nix config, because reinstalling linux 47 times taught me nothing until this

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages