infrastructure/nixos/common/modules/meta.nix

44 lines
789 B
Nix
Raw Normal View History

2023-05-04 15:14:36 +02:00
{ lib, ... }:
with lib;
let
exposesOpts = {
options = {
domain = mkOption {
type = types.str;
example = "<name>.example.com";
description = ''
The domain under which this service should be available
'';
};
port = mkOption {
type = types.int;
2023-05-05 10:04:38 +02:00
default = 80;
2023-05-04 15:14:36 +02:00
example = 4242;
description = ''
The port under which the service runs on the host
'';
};
};
};
2023-09-25 11:56:02 +02:00
in
{
options.meta = {
2023-05-05 10:04:38 +02:00
exposes = mkOption {
2023-05-04 15:14:36 +02:00
type = with types; attrsOf (submodule exposesOpts);
description = ''
Exposed services
'';
};
ipv4 = mkOption {
2023-05-04 15:14:36 +02:00
type = types.str;
description = ''
Own IPv4 Address
'';
};
};
2023-09-25 11:56:02 +02:00
config = { };
2023-05-04 15:14:36 +02:00
}