nixos-config/profiles/workspace/openvpn.nix

19 lines
697 B
Nix
Raw Normal View History

2022-06-28 00:22:21 +04:00
{ config, pkgs, lib, ... }: let password-store = config.secretsConfig.password-store; in {
2022-06-27 23:48:31 +04:00
secrets.tawasal_eu1 = {
encrypted = "${password-store}/openvpn/tawasal_eu1.gpg";
services = [ "openvpn-tawasal-eu1.service" ];
};
secrets.tawasal_eu2 = {
encrypted = "${password-store}/openvpn/tawasal_eu2.gpg";
services = [ "openvpn-tawasal-eu2.service" ];
};
services.openvpn.servers = {
tawasal-eu1.config = "config ${config.secrets.tawasal_eu1.decrypted}";
tawasal-eu2.config = "config ${config.secrets.tawasal_eu2.decrypted}";
};
2022-06-28 00:22:21 +04:00
systemd.services.openvpn-tawasal-eu1.wantedBy = lib.mkForce [];
systemd.services.openvpn-tawasal-eu2.wantedBy = lib.mkForce [];
2022-06-27 23:48:31 +04:00
}