forked from Fediversity/Fediversity
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
# interface between the nix module and TF
|
|
# TODO: could (part of) this be generated somehow? c.f #275
|
|
{
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) types mkOption;
|
|
inherit (types) str enum submodule;
|
|
in
|
|
{
|
|
options.terraform = {
|
|
domain = mkOption {
|
|
type = enum [
|
|
"fediversity.net"
|
|
];
|
|
description = ''
|
|
Apex domain under which the services will be deployed.
|
|
'';
|
|
default = "fediversity.net";
|
|
};
|
|
hostname = mkOption {
|
|
type = str;
|
|
description = ''
|
|
Internal name of the host, e.g. test01
|
|
'';
|
|
};
|
|
initialUser = mkOption {
|
|
description = ''
|
|
Some services require an initial user to access them.
|
|
This option sets the credentials for such an initial user.
|
|
'';
|
|
type = submodule {
|
|
options = {
|
|
displayName = mkOption {
|
|
type = str;
|
|
description = "Display name of the user";
|
|
};
|
|
username = mkOption {
|
|
type = str;
|
|
description = "Username for login";
|
|
};
|
|
email = mkOption {
|
|
type = str;
|
|
description = "User's email address";
|
|
};
|
|
password = mkOption {
|
|
type = str;
|
|
description = "Password for login";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|