mirror of
https://codeberg.org/muon/home.git
synced 2025-12-05 23:57:46 +00:00
21 lines
671 B
Nix
21 lines
671 B
Nix
{ pkgs, lib, config, ... }: {
|
|
options.mods = {
|
|
openvpn.enable = lib.mkEnableOption "enables openvpn config";
|
|
openvpn.config = let
|
|
username = "${config.mods.user.name}";
|
|
folder = "${config.users.users.${username}.home}/documents/openvpn/";
|
|
file = "${config.mods.user.name}.ovpn";
|
|
in lib.mkOption {
|
|
description = "the config location";
|
|
default = "${folder}${file}";
|
|
};
|
|
};
|
|
|
|
config = {
|
|
networking.networkmanager.enable = true;
|
|
services.tailscale.enable = true;
|
|
# services.openvpn.servers = lib.mkIf config.mods.openvpn.enable {
|
|
# remote.config = ''config ${config.mods.openvpn.config}'';
|
|
# };
|
|
};
|
|
}
|