1
1
mirror of https://github.com/divnix/digga.git synced 2024-11-26 23:35:12 +03:00
A flake utility library to craft shell-, home-, and hosts- environments.
Go to file
Chris Montgomery 68ade1816c
devos: devshell: add required pkgs to scope explicitly
the `with pkgs` statement in `commands` muddies the origin of the
variables used within:

- editors are unable to provide helpful advice about undefined variables
  because `with pkgs` acts as a blanket "anything is possible" signifier
- at a cursory glance, it may not be immediately clear that `system` is
  coming from `pkgs.system`
- `lib` is coming from `pkgs.lib`, but we can use the `lib` module arg.
- some pkgs within `commands` are still referenced with
  `pkgs.<package-name>` unnecessarily
2022-04-24 12:27:27 -04:00
.github ci: run on macos-latest 2022-04-20 10:31:15 -04:00
checks Cleanup how polyfill works for digga-use outputs 2022-02-26 12:15:37 -08:00
doc fix onboarding process for pulling template 2022-04-04 21:43:46 -05:00
examples devos: devshell: add required pkgs to scope explicitly 2022-04-24 12:27:27 -04:00
jobs docs: add commands to generate darwin api docs 2022-04-24 12:25:39 -04:00
modules refactor: isolate exported modules to host-type-specific files 2022-04-24 12:25:47 -04:00
overlays refactor: prepare host configs in fup adapter 2022-04-24 12:25:44 -04:00
src darwin: update mkDeployNodes to account for darwin hosts 2022-04-24 12:27:26 -04:00
.editorconfig copy over .editorconfig from devos 2022-02-23 15:22:07 -08:00
.gitignore add gitignore and remove nix build result 2022-02-23 15:22:07 -08:00
CHANGELOG.md Update Changelog for tag 2022-04-02 22:16:32 +00:00
COPYING add README and COPYING 2022-02-23 15:22:07 -08:00
default.nix default.nix: directly import devShell.nix 2022-04-05 11:46:02 -07:00
deprecated.nix chore: clean up unnecessary args to deprecated.nix 2022-04-24 12:27:25 -04:00
devShell.nix devos: devshell: add required pkgs to scope explicitly 2022-04-24 12:27:27 -04:00
flake.lock inputs: add nixpkgs-unstable 2022-04-24 12:25:36 -04:00
flake.nix chore: clean up unnecessary args to deprecated.nix 2022-04-24 12:27:25 -04:00
README.md fix onboarding process for pulling template 2022-04-04 21:43:46 -05:00
shell.nix fix onboarding process for pulling template 2022-04-04 21:43:46 -05:00

MIT License NixOS Chat

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:

This library is based on flake-utils-plus.

Status: Beta

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.

Usage

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.

Examples

Make sure to check out all the examples to see the different ways to make use of the digga api.

In the Wild

You can also see digga being actually used:

Philosophy

In it's lib.mkFlake function, Digga implements a well-specified API interface comprising four API containers that allow you to:

  1. configure nixpkgs channels including internal and external overlays,

  2. define NixOS hosts including internal and external NixOS modules as well as host defaults that apply to all hosts in the environment,

  3. specify user home environments including internal and external home-manager modules, and

  4. 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 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.

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.

Why flakes?

Flakes are a part of an explicit push to improve Nix's UX, and have become an integral part of that effort.

They also make Nix expressions easier to distribute and reuse with convient flake references for building or using packages, modules, and whole systems.

Shoulders

This work does not reinvent the wheel. It stands on the [shoulders of the following giants][giants]:

🧅 — like the layers of an onion

👪 — like family

❤️

Inspiration & Art

Divnix

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.

License

Digga is licensed under the MIT License.