I use NixOS and/or Home Manager to declaratively manage my computers. This repo is a flake that defines configurations for each of my machines, as well as some software I've packaged because they weren't in Nixpkgs:
config 🍍 nix flake show
├───homeConfigurations
│ ├───ATLAS: steamdeck
│ ├───HAL: main desktop
│ ├───clu: $work laptop
│ ├───crabapple: $work mac
│ ╰───rinzler: $work desktop
├───nixosConfigurations
│ ├───Cortana: my trusty RPi4B home server
│ ╰───WOPR: framework laptop 13" (AMD 7640U)
├───nixosModules
│ ╰───rust-rpxy: config and service for reverse proxy
├───overlays
│ ╰───default: Nixpkgs overlay with my packages and overrides
╰───packages
├───ascii-rain: pretty terminal rain animation
├───barchart: draw barcharts in the terminal
├───bibata-modern-classic: mouse cursor theme
├───cargo-clone-crate: better cargo clone command
├───fio-plot: disk benchmarking tool
├───git-heatmap: view change frequency of git repo
├───lowcharts: draw plots and histograms in the terminal
├───mons: celeste mod manager
├───rust-rpxy: simple reverse proxy
├───simple64: nintendo 64 emulator
╰───syncthing-gtk: ui+tray-menu for syncthing
I used to use this as a bare git repo. If you're not sold on nix/home-manager I think it's still a pretty ideal way to manage your dotfiles. Now when my home-manager activation script runs, it symlinks everything in the dotfiles dir into $HOME
so that you can edit most config files without having to run switch
.
garnix gives me speedy CI and caching so I don't have to rebuild my packages or overrides on all of my machines:
I learned a lot from trawling through other peoples configs, here's some cool ones to check out:
- https://github.com/Misterio77/nix-config
- https://github.com/rrbutani/nix-config
- https://gitlab.com/lunik1/nix-config
- https://git.jhink.org/jacob/nix_config
- https://github.com/sioodmy/dotfiles
- https://xeiaso.net/blog/prometheus-grafana-loki-nixos-2020-11-20//https://xeiaso.net/blog/nix-flakes-3-2022-04-07/ (they have lots of good nix related posts)
- https://ianthehenry.com/posts/how-to-learn-nix/overriding/ (and other parts of that series)
- https://github.com/PROxZIMA/.dotfiles/ (not nix, just pretty)
- https://github.com/siduck/dotfiles (ditto)