forked from Fediversity/Fediversity
54 lines
1.3 KiB
Nix
54 lines
1.3 KiB
Nix
/**
|
|
Deployment options as to be presented in the front end.
|
|
|
|
These are converted to JSON schema in order to generate front-end forms etc.
|
|
For this to work, options must not have types `functionTo` or `package` (or `submodule` until [submodule introspection](https://github.com/NixOS/nixpkgs/pull/391544) is merged), and must not access `config` for their default values.
|
|
*/
|
|
{
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) types mkOption;
|
|
in
|
|
{
|
|
options = {
|
|
domain = mkOption {
|
|
type =
|
|
with types;
|
|
enum [
|
|
"fediversity.net"
|
|
];
|
|
description = ''
|
|
Apex domain under which the services will be deployed.
|
|
'';
|
|
};
|
|
pixelfed = {
|
|
enable = lib.mkEnableOption "Pixelfed";
|
|
};
|
|
peertube = {
|
|
enable = lib.mkEnableOption "Peertube";
|
|
};
|
|
mastodon = {
|
|
enable = lib.mkEnableOption "Mastodon";
|
|
};
|
|
initialUser = {
|
|
displayName = mkOption {
|
|
type = types.str;
|
|
description = "Display name of the user";
|
|
};
|
|
username = mkOption {
|
|
type = types.str;
|
|
description = "Username for login";
|
|
};
|
|
email = mkOption {
|
|
type = types.str;
|
|
description = "User's email address";
|
|
};
|
|
password = mkOption {
|
|
type = types.str;
|
|
description = "Password for login";
|
|
};
|
|
};
|
|
};
|
|
}
|