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
- home environments (via
- host configurations (via
This library is based on flake-utils-plus.
Although this project has already matured quite a bit, a fair amount of api polishing is still expected. There are unstable versions (0.x.x) to help users keep track of changes and progress.
The best way to make use of library is with the Official template.
Check out the guide to get up and running.
Also have a look at devos's flake.nix.
If anything is not immediately discoverable via our
mkFlake, please file a bug report.
Make sure to check out all the examples to see the different ways to make use of the digga api.
You can also see digga being actually used:
- @Pacman99: Personal, Server
- @danielphan2003 and make sure to also check out devos-ext-lib
- @montchr: Dotfield – including darwin configurations
- @sweenu: pc, server and RaspberryPi deployment in one repo
lib.mkFlake function, Digga implements a well-specified 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.
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.
Overlays and modules can be defined internally coming from 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.
To craft well thought out APIs we need all the thoughts regarding new ideas.
Pull Requests are just as amazing.
Flakes are a part of an explicit push to improve Nix's UX, and have become an integral part of that effort.
This work does not reinvent the wheel. It stands on the shoulders of the following giants:
The divnix org is an open space that spontaneously formed out of "the Nix". It is really just a place where otherwise unrelated people work together and get stuff done.
It's a place to stop "geeking out in isolation" (or within company boundaries). A place to experiment, learn together, and iterate quickly on best practices. That's what it is.
It might eventually become a non-profit if that's not too complicated or, if those goals are sufficiently upstreamed into "the Nix", dissolved.
Digga is licensed under the MIT License.