nix/module/StrongSwan.nix

30 lines
709 B
Nix
Raw Normal View History

2024-06-25 04:04:39 +03:00
{ pkgs, lib, config, ... }: with lib; let
cfg = config.module.strongswan;
in {
options = {
module.strongswan.enable = mkEnableOption "StrongSwan Vpn support.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
networkmanager-l2tp
gnome.networkmanager-l2tp
# networkmanager_strongswan
# strongswan
# strongswanNM
2024-04-05 01:09:34 +03:00
];
2024-06-25 04:04:39 +03:00
networking.networkmanager.enableStrongSwan = true;
services.xl2tpd.enable = true;
services.strongswan = {
enable = true;
secrets = [
"ipsec.d/ipsec.nm-l2tp.secrets"
];
};
# NOTE: Try this if VPN ever breaks.
# systemd.tmpfiles.rules = [
# "L /etc/ipsec.secrets - - - - /etc/ipsec.d/ipsec.nm-l2tp.secrets"
# ];
2024-04-05 01:09:34 +03:00
};
2024-03-29 09:05:08 +03:00
}