Skip to content

Commit

Permalink
feat(nixosConfigurations): add stun-0.main.infra.holo.host
Browse files Browse the repository at this point in the history
this is the first STUN -only coturn server for Holo's main network
  • Loading branch information
steveej committed May 24, 2024
1 parent f9b4bb5 commit 1a4d2b7
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
config,
inputs,
self,
pkgs,
...
}: let
# https://console.hetzner.cloud/projects/1982619/servers/47741841/overview
hostName = "stun-0";
domain = "main.infra.holo.host";
ipv4 = "37.27.39.142";
fqdn = "${config.networking.hostName}.${config.networking.domain}";
in {
imports = [
inputs.disko.nixosModules.disko
inputs.srvos.nixosModules.server
inputs.srvos.nixosModules.mixins-terminfo
inputs.srvos.nixosModules.hardware-hetzner-cloud
self.nixosModules.hardware-hetzner-cloud-ccx

inputs.sops-nix.nixosModules.sops

self.nixosModules.holo-users
../../nixos/shared.nix
../../nixos/shared-nix-settings.nix

self.nixosModules.holochain-turn-server
];

networking = {inherit hostName domain;};

hostName = ipv4;

nix.settings.max-jobs = 8;

nix.settings.substituters = [
"https://holochain-ci.cachix.org"
];

nix.settings.trusted-public-keys = [
"holochain-ci.cachix.org-3:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8="
];

system.stateVersion = "23.11";

services.holochain-turn-server = {
enable = true;
url = fqdn;
address = ipv4;
listening-port = null;
nginx-http-port = 80;
username = "test";
credential = "test";
verbose = false;
extraCoturnAttrs = {
cli-ip = "127.0.0.1";
cli-password = "$5$4c2b9a49c5e013ae$14f901c5f36d4c8d5cf0c7383ecb0f26b052134293152bd1191412641a20ddf5";
};
extraCoturnConfig = ''
stun-only
'';
acme-staging = false;
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
self,
lib,
inputs,
...
}: {
flake.nixosConfigurations.stun-0_main_infra_holo_host = inputs.nixpkgs.lib.nixosSystem {
modules = [./configuration.nix];
system = "x86_64-linux";
specialArgs = self.specialArgs;
};
}

0 comments on commit 1a4d2b7

Please sign in to comment.