nixos-config/modules/nixos/_private/suites/vpn.nix

21 lines
434 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2023-06-06 04:11:47 +00:00
let
cfg = config.suites.vpn;
2023-06-06 04:11:47 +00:00
in
{
options.suites.vpn = {
2023-06-06 04:11:47 +00:00
personal.enable = lib.mkEnableOption "personal VPN configuration with Wireguard";
};
config = lib.mkMerge [
(lib.mkIf cfg.personal.enable {
services.tailscale.enable = true;
networking = {
nameservers = [ "100.100.100.100" "8.8.8.8" "1.1.1.1" ];
search = [ "barbel-bee.ts.net" ];
};
})
];
}