Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Service utility functions

Service utility functions for the atelier infrastructure.

These functions operate on NixOS configurations to extract service metadata for dashboards, monitoring, and documentation.

services.mkManifest

Build a services manifest from an evaluated NixOS config.

Discovers all enabled mkService-based services plus emojibot instances. Returns a sorted list of service entries suitable for JSON serialisation.

Arguments

  • config — the fully evaluated NixOS configuration

Type

AttrSet -> [ AttrSet ]

Example

mkManifest config
=> [ { name = "cachet"; domain = "cachet.dunkirk.sh"; ... } ... ]

services.mkMachinesManifest

Build a manifest of all machines and their services.

Takes one or more attrsets of system configurations (NixOS, Darwin, or home-manager) and returns an attrset keyed by machine name. Only machines with atelier.machine.enable = true are included.

Arguments

  • configSets — list of attrsets of system configurations

Type

[ AttrSet ] -> AttrSet

Example

mkMachinesManifest [ self.nixosConfigurations self.darwinConfigurations ]
=> { terebithia = { hostname = "terebithia"; services = [ ... ]; }; }