add headscale, eth clients to htz

This commit is contained in:
iofq 2024-02-04 01:57:41 -06:00
parent 4293324f36
commit 1849fdc496
No known key found for this signature in database
GPG key ID: ECF3B2DA38BF7183
15 changed files with 289 additions and 417 deletions

View file

@ -1,37 +1,67 @@
{
pkgs,
addressList,
...
}: {
{pkgs, ...}: {
imports = [
./hardware-configuration.nix
./vms
#./eth.nix
./eth.nix
];
environment.systemPackages = with pkgs; [
vim
git
bridge-utils
comma
];
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
networking = {
hostName = "htz";
domain = "";
firewall = {
enable = true;
allowedTCPPorts = [22];
allowedTCPPorts = [22 80 443];
allowedUDPPorts = [];
logRefusedConnections = true;
};
nat = {
};
fileSystems."/var/lib/private/nimbus-beacon-mainnet" = {
device = "/eth2";
options = ["bind"];
};
fileSystems."/var/lib/private/geth-mainnet" = {
device = "/eth1";
options = ["bind"];
};
services = let
domain = "ts.10110110.xyz";
in {
openssh.enable = true;
tailscale.enable = true;
headscale = {
enable = true;
forwardPorts = [
{
proto = "tcp";
sourcePort = 80;
destination = addressList.vm-test.ipv4;
}
];
address = "0.0.0.0";
port = 8080;
serverUrl = "https://${domain}";
dns = {baseDomain = domain;};
settings = {logtail.enabled = false;};
};
nginx = {
enable = true;
virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8080";
proxyWebsockets = true;
};
};
};
};
services.openssh.enable = true;
security.acme = {
acceptTerms = true;
defaults.email = "mail@10110110.xyz";
};
users.users = {
root = {
openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14''];