From a04727757b988da37199ac3bd9a9867420cc3f46 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Fri, 31 May 2024 13:53:59 -0500 Subject: [PATCH] updated readme with structure. --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index ef47750..dc340a7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,29 @@ # nix-config My configs for both nixos and home manager only machines + +## structure + +``` +. +├── flake.nix +├── configs +│ ├── home-manager +│ └── nixos +├── hosts +├── modules +│ ├── home-manager +│ └── hostopts.nix +├── roles +│ ├── home-manager +│ └── nixos +└── templates +``` +* Configs set options and specify programs to be installed. +They do not specify their own options, and take effect as soon as they are imported. +Generally, a config will be specific to a single program, and possibly optional dependecies of the main program. +* Hosts define specific hosts. They are the entry point into the system. +Each host *must* import `configs/nixos/common.nix` in the top level and `configs/home-manager/common.nix` in the home-manager block. +Each host *must also* define the variables declared in `modules/hostopts.nix`. +* Modules are always imported by the respective common.nix. They each have an enable option, and only have effects if enabled. +* Roles are larger bundles of software and options. They define packages to be installed and may import configurations or enable modules.