From 616d7543ca4babf0942b7b9a234785813b47ed9f Mon Sep 17 00:00:00 2001 From: yuri Date: Sat, 15 Jul 2023 23:29:19 +0200 Subject: [PATCH] Add tor-relay config --- flake.nix | 12 ++++++++++++ hosts/coturn/configuration.nix | 2 +- hosts/tor-relay/configuration.nix | 23 +++++++++++++++++------ hosts/tor-relay/default.nix | 7 +++++++ hosts/tor-relay/tor.nix | 4 ++-- 5 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 hosts/tor-relay/default.nix diff --git a/flake.nix b/flake.nix index 7323fd3..8480f96 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,18 @@ ./hosts/coturn ]; }; + + tor-relay = { name, nodes, pkgs, ...}: { + deployment = { + targetHost = "tor-relay.vs.grzb.de"; + targetUser = "colmena-deploy"; + }; + imports = [ + ./configuration/common + ./configuration/proxmox-vm + ./hosts/tor-relay + ]; + }; }; }; } diff --git a/hosts/coturn/configuration.nix b/hosts/coturn/configuration.nix index d345b75..094f157 100644 --- a/hosts/coturn/configuration.nix +++ b/hosts/coturn/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { boot.loader.grub = { enable = true; diff --git a/hosts/tor-relay/configuration.nix b/hosts/tor-relay/configuration.nix index 637244a..90dbc71 100644 --- a/hosts/tor-relay/configuration.nix +++ b/hosts/tor-relay/configuration.nix @@ -1,12 +1,23 @@ -{ config, pkgs, ... }: - +{ ... }: { - imports = [ - ./hardware-configuration.nix - ./tor.nix - ]; + boot.loader.grub = { + enable = true; + device = "/dev/vda"; + }; networking = { + interfaces = { + "enp6s18".ipv6.addresses = [{ + address = "2001:470:5429::B3"; + prefixLength = 64; + }]; + }; + + defaultGateway6 = { + address = "2001:470:5429::1"; + interface = "enp6s18"; + }; + hostName = "tor-relay"; firewall.enable = false; }; diff --git a/hosts/tor-relay/default.nix b/hosts/tor-relay/default.nix new file mode 100644 index 0000000..585accc --- /dev/null +++ b/hosts/tor-relay/default.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + imports = [ + ./configuration.nix + ./tor.nix + ]; +} diff --git a/hosts/tor-relay/tor.nix b/hosts/tor-relay/tor.nix index 54e9888..58efb89 100644 --- a/hosts/tor-relay/tor.nix +++ b/hosts/tor-relay/tor.nix @@ -10,8 +10,8 @@ SOCKSPort = 0; ControlSocket = null; ContactInfo = "admin@grzb.de"; - RelayBandwidthRate = "70 MBits"; - RelayBandwidthBurst = "150 Mbits"; + RelayBandwidthRate = "40 MBits"; + RelayBandwidthBurst = "50 Mbits"; DirPort = 9030; }; };