mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 06:19:00 +00:00
profiles/vpn: init NixOS module
This commit is contained in:
parent
80400c215a
commit
ca57681f01
20
modules/nixos/profiles/vpn.nix
Normal file
20
modules/nixos/profiles/vpn.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user