library reference expected to come as soon as flake-utils-plus has the corresponding implementation.
3.5 KiB
⚠ Advisory ⚠
Digga requires the flakes feature available via an experimental branch of nix. Until nix 3.0 is released, this project should be considered unstable, though quite usable as flakes have been maturing well for a while.
Digga — slangy german for "good friend" — is a flake utility library that helps you declaratively craft and manage all three layers of your system environment within a single nix flakes repository:
- development shells (via
numtide/devshell
), - home environments (via
nix-community/home-manager
), and - host configurations (via
NixOS/nixpkgs/nixos
).
This library is based on flake-utils-plus.
Usage
The best way to make use of library is with the Official template.
You can also have a look at the different examples.
Philosophy
In it's lib.mkFlake
function, digga implements a well-secified API
interface comprising four API containers that allow you to:
-
configure nixpkgs channels including internal and external overlays,
-
define nixos hosts including internal and external nixos modules as well as host defaults that apply to all hosts in the environment,
-
specify user home environments including internal and external home-manager modules, and
-
setup & combine a series of devshells that you like to have available in your projects.
Modules, Profiles & Suites
For nixos- & home-manager-modules, digga allows you to distinguish between modules, profiles and suites.
-
Modules are abstract configurations that, while holding the implementation, do not set any system state.
-
Profiles are concrete configurations that set system state within the profile domain.
-
Suites are a composable, clean and discoverable mechanism for profile aggregation.
Internal Art vs External Art
Overlays and modules can be defined internally coming form your repo or externally coming from an upstream flake. This distinction serves the library to only export your own work as the public flake output.
Downstream consumers of your flake can now more easily tell your art apart from other upstream art.
Contributing
We encourage contributions of any kind. The simplest way to get involved is to join the chat or report problems and ideas on the issue thread.
To craft well thought out APIs we need all the thoughts regarding new ideas.
Pull Requests are just as amazing.
License
Digga is licensed under the MIT License.