summaryrefslogtreecommitdiff
path: root/hosts/cloud/hetzner/configuration.nix
blob: bc23cf745105eba4b759ac23f9e35c0ce1276ef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
  modulesPath,
  lib,
  pkgs,
  ...
}: {
  imports = [
    # ./hardware-configuration.nix
    (modulesPath + "/installer/scan/not-detected.nix")
    (modulesPath + "/profiles/qemu-guest.nix")
    ./nginx.nix
    ./disk-config.nix
    ../../base.nix
    ../users.nix
    ../packages.nix
    ../../server.nix
    # ./mail.nix
  ];
  boot = {
    loader.grub = {
      efiSupport = true;
      efiInstallAsRemovable = true;
    };
  };

  networking = {
    hostName = "yn-hel";
  };
  networking.firewall = {
    enable = false;
    #   allowedTCPPorts = [ 993 465 40308 80 443 53 51820 5522 ];
    #   allowedUDPPorts = [ 993 465 40308 80 443 53 50000 50001 50002 50003 50004 50005 50006 50007 50008 50009 50010 51820 5522 ];
  };
  # services.ntfy-sh = {
  #   enable = true;
  #   settings = {
  #     base-url = "https://n.urbit.men";
  #     listen-http = ":8090";
  #   };
  # };

  # services.headscale = {
  #   enable = true;
  #   address = "0.0.0.0";
  #   port = 8001;
  #   settings = {
  #     server_url = "https://head.urbit.men";
  #     dns.baseDomain = "urbit.men";
  #     logtail.enabled = false;
  #   };
  # };

  services.nostr-rs-relay = {
    enable = true;
    settings = {
      info = {
        description = "Oorbit coming";
        pubkey = "npub1ll29wev5zztj7mugxnqlzpa45m0t779zte4x90ugf3psxxqyzr6sk9nq94";
        relay_url = "wss://n.urbit.cloud";
        name = "UrNostr";
      };

      network = {
        # Bind to this network address
        address = "0.0.0.0";
        # Listen on port 12849 (this is the default). I have not managed to find any way to change it. KEEP IT default!
      };

      authorization = {
        pubkey_whitelist = [
          "npub1ll29wev5zztj7mugxnqlzpa45m0t779zte4x90ugf3psxxqyzr6sk9nq94"
        ];
      };

      options = {
        max_event_size = 16384;
        reject_future_seconds = 1800;
      };

      limits = {
        max_subscriptions = 20;
        max_filters = 100;
      };
    };
  };

  # Open firewall for the relay port
  networking.firewall.allowedTCPPorts = [
    80
    443
  ]; # Add 80/443 if using a reverse proxy

  system.stateVersion = "24.11"; # Did you read the comment?
}