Develop the manifest format for packaging services #40
Labels
No Label
Contributions welcome
Service packaging
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Blocks
#65 Support for the SelfPrivacy flake format
SelfPrivacy/selfprivacy-rest-api
#46 Move JItsi into SP module
SelfPrivacy/selfprivacy-nixos-config
Reference: SelfPrivacy/selfprivacy-nixos-config#40
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
TBD.
The format should provide the API with at least the following:
Speaking of icons for options and actions, we may use the string IDs of the Material Icons.
Format should at least be readable by our Python API. JSON Schema? We could use existing work on JSON schemas to write UI generators and validators. We should have schema versioning from the beginning.
Based on the current development progress, much of the manifest information can be retrieved from a SP module flake, such as:
SP module name
SP module description
systemd services (units?) to be added, configured, etc
configurable options (from NixOS module generated JSON documentation):
Basically, such information is enough to generate search.nixos.org GUI. But it lacks icons and maybe some additional information for better options displaying in GUI.
a list of NixOS
config
paths, which a SP module needs (it adds a layer of security to forbid access to other parts of a NixOS configuration for untrusted SP modules), example:4419a1323a/sp-modules/simple-nixos-mailserver/config-paths-needed.json
possible relations to other SP modules (and maybe other stock NixOS services) can be potentially derived by automatic analysis of common options paths
I referred to the manifest subject as "SP module", but the naming has not been settled and can be "SP service" or "SP extension", etc.
Since much of the manifest data can be evaluated from Nix code of a SP module, it is not clear whether
It becomes more complex if we want to add more information for options, except those, which NixOS module has. It needs to be added either in:
Example of NixOS options documentation generation in JSON format:
It uses
nixpkgs
registry flake fornixosOptionsDoc
andlib.evalModules
functions. Alternatively exact nixpkgs commit can be specified asgithub:nixos/nixpkgs?rev=c1be43e8e837b8dbee2b3665a007e761680f0c3d
.sp-module
variable is the flake where SP module is contained.In case of success
result/share/doc/nixos/options.json
file will be produced like this: