Modular, context-aware and aspect-oriented dendritic Nix configurations.
Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/
den.oeiuwq.com
configurations
den
dendritic
nix
aspect
oriented
1{ den, ... }:
2let
3 description = ''
4 Sets the system hostname as defined in `den.hosts.<name>.hostName`:
5
6 Works on NixOS/Darwin/WSL.
7
8 ## Usage
9
10 den.defaults.includes = [ den._.hostname ];
11 '';
12
13 setHostname =
14 { host, ... }:
15 {
16 ${host.class}.networking.hostName = host.hostName;
17 };
18in
19{
20 den.provides.hostname = den.lib.parametric.atLeast {
21 inherit description;
22 includes = [ setHostname ];
23 };
24}