blob: 194513fbd1b7ddda7d889c50a9fdf6ff6a9494fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
{
config,
lib,
pkgs,
...
}:
let
inherit ((import ../lib.nix { inherit lib pkgs; })) mkScriptModule;
base = mkScriptModule {
name = "vpn-connect";
path = ./script.sh;
description = "VPN-connect - OpenVPN connection script with credential caching and monitoring";
env = {
SYSTEMD_RESOLVED_PATH = "${config.security.openvpn.package}/libexec/update-systemd-resolved";
};
deps = [
config.terminal.fzf.package
config.security.openvpn.package
pkgs.coreutils
pkgs.findutils
pkgs.gnugrep
pkgs.gnused
];
inherit config;
};
in
{
options = base.options;
config = base.moduleConfig // {
assertions = base.moduleConfig.assertions ++ (import ./assertions.nix { inherit config lib; });
};
}
|