tailscale

This commit is contained in:
Callum Leslie 2024-09-02 15:05:48 +01:00
parent 961d41b9bf
commit c558bad713
Signed by: cleslie
GPG key ID: D382C4AFEECEAA90
15 changed files with 106 additions and 15 deletions

View file

@ -7,7 +7,13 @@
}: let
inherit (inputs.self.nixosModules) keys;
in {
services.remote-deploy = {
c.services.mesh = {
enable = true;
exitNode = true;
keyFile = config.age.secrets.mesh-conf-infra.path;
};
c.services.remote-deploy = {
enable = true;
host = "media.cleslie.uk";
port = 62480;

View file

@ -1,4 +1,4 @@
{
{inputs}: {
modules = [
./hardware-configuration.nix
./configuration.nix
@ -7,6 +7,7 @@
./networking.nix
./ssh.nix
./media.nix
./headscale.nix
];
extraArgs = {};
specialArgs = {};

View file

@ -0,0 +1,20 @@
{config, ...}: let
domain = "mesh.cleslie.uk";
in {
services = {
headscale = {
enable = true;
address = "0.0.0.0";
port = 8080;
settings = {
server_url = "https://${domain}";
dns_config = {base_domain = "cleslie.uk";};
ip_prefixes = "100.64.0.0/10";
};
};
caddy.virtualHosts.${domain}.extraConfig = ''
reverse_proxy localhost:${toString config.services.headscale.port}
'';
};
}