Design Philosophy
Freedom of Information
No person stands alone in creating anything. Every part of what you make is built off of the labor of others and to claim that you stand out alone with inventions that you alone built is arrogant. Every bit of work that you have done was enabled by tools created by others. Every bit of knowledge that you use to create something is a refinement on knowledge discovered by others. You are not special and neither am I. Our greatest strength is our capacity to uplift each other and help out the person who comes next with the understanding and expectation that they will do the same for you.
As a part of that philosophy this repository serves as a publicly usable example of the works and knowledge that have gone into creating the fixed points defining these configurations. They are free to use and extend on as long as the social contract of educate and give as freely as you are able to is upheld.
Version as configuration not as integration
Traditionally systems are configured via a set of actions performed one after another in a live environment. This makes every single step have the possibility of being affected by the steps that came before it and affecting the steps that are to come after it. This creates a problem when trying to recreate a system or provide aid to others to derive their own system based on an existing one.
To combat this problem we use tools like nix to define a complete system configuration that can be used to fully derive a system configuration that can then be applied to a system’s state. This system configuration can then be tracked using version control to share and accept contributions allowing other users to create a similar system with their own state specific to their use-case.
Composability
Things are split into modules so that they can be opted into one at a time. This also helps with separation of concerns as a side effect.
Separation of concerns
- explain what a dendrite is
- describe how we use import tree with dendrites.
| Path | Description |
|---|---|
/const |
shared constants used by many parts of the configuration |
/lib |
shared library code used by many parts of the configuration |
/modules |
modules that define a system |
├── options |
values that are to be used by command line tools |
├── fleet |
fleet configuration options |
├── nixos |
NixOS configuration options |
│ ├── fleet-adaptors |
tools for passing configuration from a fleet to a nixos device |
│ ├── home-manager-adaptors |
tools for passing configuration from a home configuration to a nixos device |
│ ├── pkgs/<package> |
instructions configuring arbitrary program packages |
│ └── programs/<program> |
a program configured to run on a NixOS system along with any extension module to it |
├── darwin |
mac system configuration options |
├── home-manager |
home manager configuration options |
├── hosts |
implementation of system configurations |
│ ├── darwin |
implementations of mac system configurations |
│ ├── fleet |
implementations of fleet configurations |
│ ├── nixos |
implementations of NixOS configurations |
│ └── home-manager |
implementations of home configurations |
└── syncthing |
legacy configuration method for syncthing between devices. (Should be moved to be a part of fleet configuration!) |
/tests |
tests to run when validating changes do not cause regressions |
/npins |
dependency management managed via npins |
/*/__tests__/ |
Tests that are colocated with a module |
Automation
fill out section here
- well defined, well built specific tools are better than fragile general ones
- repeated tasks should have tools made to reduce the load on maintainers