This fixes the evaluation of modules such as those tested by nix-build -A nixosTests.php.fpm-modular ... ahead of the proper fix that factors meta.maintainers out of NixOS.
53 lines
1.7 KiB
Nix
53 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
options,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) mkOption types;
|
|
pathOrStr = types.coercedTo types.path (x: "${x}") types.str;
|
|
in
|
|
{
|
|
# https://nixos.org/manual/nixos/unstable/#modular-services
|
|
_class = "service";
|
|
imports = [
|
|
../../../misc/assertions.nix
|
|
];
|
|
options = {
|
|
services = mkOption {
|
|
type = types.attrsOf (
|
|
types.submoduleWith {
|
|
modules = [
|
|
./service.nix
|
|
];
|
|
}
|
|
);
|
|
description = ''
|
|
A collection of [modular services](https://nixos.org/manual/nixos/unstable/#modular-services) that are configured in one go.
|
|
|
|
You could consider the sub-service relationship to be an ownership relation.
|
|
It **does not** automatically create any other relationship between services (e.g. systemd slices), unless perhaps such a behavior is explicitly defined and enabled in another option.
|
|
'';
|
|
default = { };
|
|
visible = "shallow";
|
|
};
|
|
process = {
|
|
argv = lib.mkOption {
|
|
type = types.listOf pathOrStr;
|
|
example = lib.literalExpression ''[ (lib.getExe config.package) "--nobackground" ]'';
|
|
description = ''
|
|
Command filename and arguments for starting this service.
|
|
This is a raw command-line that should not contain any shell escaping.
|
|
If expansion of environmental variables is required then use
|
|
a shell script or `importas` from `pkgs.execline`.
|
|
'';
|
|
};
|
|
};
|
|
# TODO: use https://github.com/NixOS/nixpkgs/pull/431450
|
|
meta = lib.mkOption {
|
|
description = "The maintainers of this module. This is currently a placeholder option whose value may not evaluate to anything useful until https://github.com/NixOS/nixpkgs/pull/431450 is available and used here.";
|
|
};
|
|
};
|
|
}
|