- Nix 86%
- Lua 12.6%
- Shell 0.7%
- Just 0.7%
My Dotfiles
Repository Structure
The structure is strongly inspired by Jake Hamilton's Snowfall Lib.
.
├── hosts
├── modules
├── overlays
└── packages
Hosts
- One directory per host
- Containing
configuration.nix&hardware-configuration.nixhome.nix(orhome-name.nixfor multi-user hosts)
- Hosts need to be explicitly referenced in
flake.nix
Modules
To simplify managing of modules, I copied & adapted parts of Snowfall Lib (implementation: lib.nix).
outputs.nixosModules & outputs.homeManagerModules are created using the custom module.create-modules function.
Most modules exposed by this flake aren't meant to be used by others, as they often contain rather specific configurations.
Modules named public/* expose enough options and provide reasonable defaults, which makes them a better candidate to include. Some of them will probably even be contributed upstream.
- One directory per module
default.nixis a modules "entry point"- Can be nested based on "category"
- Path to
default.nixwill be the module name (e.g.,hardware/nvidiais accessible withoutputs.nixosModules.hardware/nvidia)
menu Options
Note: doesn't apply to
public/*modules.
The config.menu options attribute set is the main interface to interact with my custom modules.
menu is defined globally and imported into all nixosConfigurations & homeManagerConfigurations.
All implementations, except settings.allowUnfreePackages, are specific to NixOS or Home Manager and therefore implemented in modules/{nixos|home-manager}.
menu
├── settings
│ ├── allowUnfreePackages (both)
│ └── ...
├── profiles
│ ├── private (both)
│ ├── work (both)
│ ├── gaming (both)
│ └── ...
├── apps
│ ├── firefox (hm)
│ ├── syncthing (nixos)
│ └── ...
├── desktop
│ ├── enable (nixos)
│ ├── gnome (both)
│ └── ...
└── hardware
├── nvidia (nixos)
└── ...
Overlays
Some custom overlays I use with all of my hosts.
- Same structure as Modules
Packages
Some custom packages, that I needed at some point. Maybe some of them will be contributed upstream.
Please keep in mind that most packages were probably only successfully built on x86_64-linux or aarch64-darwin.
I have no checks in place to ensure that the packages are up-to-date!
- Same structure as Modules
Documentation
More docs can be found in the
docsdirectory.