feat: Tailscale VPN Setup

This commit is contained in:
2025-02-18 20:52:16 +01:00
parent dc2abe6ff1
commit ce4e8225f9
5 changed files with 32 additions and 1 deletions
-1
View File
@@ -41,5 +41,4 @@
systems = [ "x86_64-linux" ];
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
}
+4
View File
@@ -35,4 +35,8 @@ in
bluetooth.enable = true;
sound.enable = true;
};
my.services = {
vpn.enable = true;
};
}
+1
View File
@@ -3,5 +3,6 @@
imports = [
./environments
./hardware
./services
];
}
+8
View File
@@ -0,0 +1,8 @@
# Service-related modules
{ ... }:
{
imports = [
./vpn
];
}
+19
View File
@@ -0,0 +1,19 @@
# self-hosted vpn
{ config, lib, ... }:
let
cfg = config.my.services.vpn;
inherit (config.networking) domain;
in
{
options.my.services.vpn = with lib; {
enable = mkEnableOption "Headscale VPN Setup";
};
config = lib.mkIf cfg.enable (
lib.mkMerge [
{
services.tailscale.enable = true;
}
]
);
}