]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/modules/services/networking/domains.nix
nix: revamp the hierarchy
[sourcephile-nix.git] / nixos / modules / services / networking / domains.nix
1 {pkgs, lib, config, system, ...}:
2 let inherit (lib) types;
3 in {
4 options.networking = {
5 domainBase = lib.mkOption {
6 type = types.str;
7 description = "Base network name.";
8 example = "example";
9 };
10 domainAliases = lib.mkOption {
11 type = types.listOf types.str;
12 description = "Domain aliases.";
13 example = [ "example.org" "example.net" ];
14 };
15 zones = lib.mkOption {
16 type = types.attrsOf (types.submodule ({name, options, config, ...}: {
17 options = {
18 iface = lib.mkOption {
19 type = types.str;
20 description = "Interface name.";
21 example = "eth0";
22 };
23 ipv4 = lib.mkOption {
24 type = types.str;
25 description = "Static IPv4 address of the machine.";
26 example = "1.2.3.4";
27 };
28 ipv6 = lib.mkOption {
29 type = types.str;
30 description = "Static IPv6 address of the machine.";
31 example = "fe80::1";
32 };
33 };
34 }));
35 };
36 };
37 }