feat: Tailscale VPN Setup
This commit is contained in:
@@ -3,5 +3,6 @@
|
||||
imports = [
|
||||
./environments
|
||||
./hardware
|
||||
./services
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# Service-related modules
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./vpn
|
||||
];
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user