{ config, lib, pkgs, ... }: let in { environment.systemPackages = [ pkgs.cifs-utils ]; systemd.network.networks.c-base = { matchConfig.Name = "c-base"; networkConfig = { IgnoreCarrierLoss = "3s"; KeepConfiguration = "static"; DNS = "10.0.1.254"; Domains = "cbrp3.c-base.org"; }; routes = [ { routeConfig = { Destination = "10.0.1.0/24"; Gateway = "172.31.77.1"; };} { routeConfig = { Destination = "91.102.9.99/32"; # vorstand.c-base.org Gateway = "172.31.77.1"; };} ]; }; services.openvpn.servers.c-base = { config = '' remote vpn.ext.c-base.org 1194 verify-x509-name vpn.ext.c-base.org name client proto udp dev-type tun dev c-base resolv-retry infinite nobind # user openvpn # group openvpn persist-key persist-tun comp-lzo # register-dns # block-outside-dns script-security 2 auth-user-pass ${toString } #auth-user-pass key-direction 1 # # 2048 bit OpenVPN static key # -----BEGIN OpenVPN Static key V1----- 54a66ed1048bed7508703347e89d68d6 5586e6a5d1218cf8675941031d540be6 993e07200a16ad3b770b659932ee71e5 f8080b5c9fa2acb3893abd40fad2552c fdaf17565e617ae450efcccf5652dca5 a16419509024b075941098731eb25ac0 a64f963ece3dca1d2a64a9c5e17839d7 5b5080165a9b2dc90ef111879d7d3173 2d1027ae42d869394aca08da4472a9d0 6b724b4ed43a957feef7d6dfc86da241 74828fa0e1240941586f0d937cac32fc 13cc81e7bed58817353d6afaff7e6a26 4f9cc086af79c1cdca660d86e18cff96 69dd3d392caf09a468894a8504f4cc7c 7ae0072e6d9ad90b166ad13a39c57b3c 3a869e27a1d89deb161c255227551713 -----END OpenVPN Static key V1----- -----BEGIN CERTIFICATE----- MIIGsDCCBJigAwIBAgIJAPkM1l2zA306MA0GCSqGSIb3DQEBCwUAMIGWMQswCQYD VQQGEwJERTEPMA0GA1UEBxMGQmVybGluMRswGQYDVQQLExJ2cG4uZXh0LmMtYmFz ZS5vcmcxGzAZBgNVBAMTEnZwbi5leHQuYy1iYXNlLm9yZzEbMBkGA1UEKRMSdnBu LmV4dC5jLWJhc2Uub3JnMR8wH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