add a modular more modular vpn config

This commit is contained in:
Daylin Morgan 2024-01-23 15:12:15 -06:00
parent 30998ec8ea
commit b39a66958c
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
4 changed files with 17 additions and 4 deletions

View file

@ -5,7 +5,6 @@
...
}: {
imports = with inputs.self.nixosModules; [
common
desktop
hyprland
@ -20,6 +19,9 @@
node
tex
];
services.vpn.enable = true;
services.restic.backups.gdrive = {
user = "daylin";
repository = "rclone:g:archives/othalan";
@ -31,9 +33,6 @@
zk
rclone
quarto
expect
openconnect
];
programs.gnupg.agent = {

View file

@ -8,6 +8,7 @@
common
gui
vscode
vpn
# qtile
];
}

13
modules/vpn.nix Normal file
View file

@ -0,0 +1,13 @@
{config, lib,pkgs,...}:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.services.vpn;
in {
options.services.vpn.enable = mkEnableOption ''
use openconnect vpn
'';
config = mkIf cfg.enable {
environment.systemPackages = [pkgs.openconnect];
};
}