Self-host your own digital island
1{ lib, config, ... }:
2
3with lib;
4
5{
6 imports = [
7 ./services/dns/default.nix
8 ./mailserver/default.nix
9 ./mastodon.nix
10 ./mailserver.nix
11 ./gitea.nix
12 ./dns.nix
13 ./matrix.nix
14 ./turn.nix
15 ./headscale.nix
16 ./wireguard/server.nix
17 ./wireguard/default.nix
18 ];
19
20 options.eilean = with types; {
21 username = mkOption {
22 type = str;
23 };
24 secretsDir = mkOption {
25 type = path;
26 };
27 serverIpv4 = mkOption {
28 type = str;
29 };
30 serverIpv6 = mkOption {
31 type = str;
32 };
33 publicInterface = mkOption {
34 type = str;
35 };
36 };
37
38 config = {
39 security.acme.defaults.email = "${config.eilean.username}@${config.networking.domain}";
40 networking.firewall.allowedTCPPorts = lib.mkIf config.services.nginx.enable [
41 80 # HTTP
42 443 # HTTPS
43 ];
44 };
45}