summaryrefslogtreecommitdiffstats
path: root/jeschli/1systems/bln/dcso-vpn.nix
diff options
context:
space:
mode:
authorlassulus <lass@blue.r>2018-06-28 00:12:19 +0200
committerlassulus <lass@blue.r>2018-06-28 00:12:19 +0200
commit5eabc074b7c301ca54c30df9ab6fcfd38aa879a3 (patch)
tree0587cdf7331386ec82675cf0a304fb8b917980bf /jeschli/1systems/bln/dcso-vpn.nix
parent370c2b511e1293e6112814c88ab8b93cac14ae2a (diff)
parent7ee237d1ad6c26c7569d3e26875dec5b077c1650 (diff)
Merge remote-tracking branch 'prism/staging/jeschli'
Diffstat (limited to 'jeschli/1systems/bln/dcso-vpn.nix')
-rw-r--r--jeschli/1systems/bln/dcso-vpn.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/jeschli/1systems/bln/dcso-vpn.nix b/jeschli/1systems/bln/dcso-vpn.nix
new file mode 100644
index 000000000..0a5623bf0
--- /dev/null
+++ b/jeschli/1systems/bln/dcso-vpn.nix
@@ -0,0 +1,44 @@
+with import <stockholm/lib>;
+{ ... }:
+
+{
+
+ users.extraUsers = {
+ dcsovpn = rec {
+ name = "dcsovpn";
+ uid = genid "dcsovpn";
+ description = "user for running dcso openvpn";
+ home = "/home/${name}";
+ };
+ };
+
+ users.extraGroups.dcsovpn.gid = genid "dcsovpn";
+
+ services.openvpn.servers = {
+ dcso = {
+ config = ''
+ client
+ dev tun
+ tun-mtu 1356
+ mssfix
+ proto udp
+ float
+ remote 217.111.55.41 1194
+ nobind
+ user dcsovpn
+ group dcsovpn
+ persist-key
+ persist-tun
+ ca ${toString <secrets/dcsovpn/ca.pem>}
+ cert ${toString <secrets/dcsovpn/cert.pem>}
+ key ${toString <secrets/dcsovpn/cert.key>}
+ verb 3
+ mute 20
+ auth-user-pass ${toString <secrets/dcsovpn/login.txt>}
+ route-method exe
+ route-delay 2
+ '';
+ updateResolvConf = true;
+ };
+ };
+}