Anthony Rodriguez
6ab835555c
As my NixOS configuration kept growing, I noticed that I don't need home-manager as much as I did before. A lot of what I need is just a way to map nix attrsets to the program's respective configuration format, which is something that I can now do myself, as my nix knowledge got more extensive. After all of this, I decided to completely get rid of home-manager, and switch to a simpler solution called hjem, which just lets me write files to my home directory that are automatically symlinked using `systemd-tmpfiles`. This allows me to simplify my configuration, remove the separation between NixOS and home-manager modules, and cut my eval times by quite a lot (which allows for faster `nixos-rebuild switch`!). |
||
---|---|---|
assets | ||
hosts | ||
modules | ||
secrets | ||
shared | ||
.gitignore | ||
flake.lock | ||
flake.nix | ||
LICENSE | ||
nodes.nix | ||
README.md | ||
treefmt.nix |
flocon
My NixOS configurations, using flakes.
</> Software I use
Additionally using a lot of other software you can find in the configuration files.
🛠️ Structure
Name | Description |
---|---|
assets | Resources used throughout the system (images etc.) |
config | System configuration (separated between NixOS / home-manager) |
hosts | Host-specific |
lib | Helper functions |
shared | Re-used components (internal modules, custom derivations) |
My configuration is structured based on the following principles:
- Hosts should be the main entry points and outputs.
- Abstractions should be avoided as much as possible.
- Setting up theming should be as simple as changing one or two options.
The main configuration can be found in config, which declares most of my programs, with re-usable modules and derivations in shared, to provide a way to globally set themes, usernames and more.
My hosts can then pick and choose the programs and configurations that they need from the other directories. If the need arises for a more modular setup for a specific piece of software (ie. having different flavors of Firefox per host), I will write a custom module for it. This helps to avoid unnecessarily abstracting my configuration, as I don't find it necessary for the most part, and I would also like it to remain as simple as possible.
👥 Credits
People / repositories I have copied / learned from:
-
fufexan/dotfiles for the configuration structure
-
jacekpoz/nixos for learning how NixOS modules work
-
sodiboo for helping me a whole lot with Niri-specific issues
-
llakala for being very thorough and helpful when cleaning up my code and general structure.
Some bits have also been borrowed from within the configuration, and credit has been given where its due.