profiles/vpn: init NixOS module

This commit is contained in:
Gabriel Arazas 2023-06-06 12:11:47 +08:00
parent 80400c215a
commit ca57681f01
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -0,0 +1,20 @@
{ config, options, lib, pkgs, ... }:
let
cfg = config.profiles.vpn;
in
{
options.profiles.vpn = {
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" ];
};
})
];
}