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

View file

@ -8,6 +8,7 @@
common common
gui gui
vscode vscode
vpn
# qtile # 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];
};
}