| hosts | ||
| modules | ||
| .gitignore | ||
| .sops.yaml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
Nix Systems
Thanks for taking a look at my Nix* flake! This config is primarily organized for my own use, you may find individual services or config useful to read, reference, and adapt for your own systems.
Installation prep
First, install a blank NixOS. This can be done from any system with the Nix package manager installed, but I recommend the official ISO.
I use Disko to automatically format your drive according to a declared config.
Use nix-shell -p disko --run "sudo disko --mode destroy,format,mount ./disko.nix" to format the disk with Disko.
Next, generate a per hardware nix file using nixos-generate-config --root /mnt.
You can adapt the hardware-configuration.nix file to the format of /hosts, to ensure essential drivers are loaded on boot later.
Next, install to the mounted drive with nixos-install --root /mnt.
Deploying
Colmena is used to deploy to a new image of NixOS. After adjusting this flake and adding any keys you need, you can deploy using colmena apply --impure --on host, where "host" is the hostname provided by this flake.
Usage
Home-Manager is handled along side the system, but can be used on other systems with Nix installed.
A rebuild of a user's home is done with nh home switch . -c user, where user is defined under homeConfigurations in the flake.
My config pirmarily uses these tools:
Sway - Window manager / Desktop
ZSH - Primary shell
Foot - Terminal emulator
Rofi - App launcher and menu system
This config relies on sops-nix secrets. If you want to fork or rebuild this flake, you will need to either remove or rebuild the secrets.
Credits
Initial heavy inspiration comes from these flakes:
CloudyChris' nix-starter-configs fork, the very starting base of my flake file.
WillPower3309's personal flake, for the SwayFX project and introducing me to secrets.
Jules Sommer's flake rewrite, for helping me build my flake to what it is now.
Made with love. ❤️