summaryrefslogtreecommitdiffstats
path: root/lass/2configs/dcso-vpn.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-10-07 11:08:13 +0200
committermakefu <github@syntax-fehler.de>2017-10-07 11:08:13 +0200
commit8290c6507e500c1899f4a7d1184ef5b24c8132cb (patch)
tree91d64e1cc20647acce06f7f28da46b58e5dd2571 /lass/2configs/dcso-vpn.nix
parent52f9105027a7c2d70145d7d2db69452e148b2158 (diff)
parenta8db051451d2827d7c7ad38f005284013e63c039 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass/2configs/dcso-vpn.nix')
-rw-r--r--lass/2configs/dcso-vpn.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/lass/2configs/dcso-vpn.nix b/lass/2configs/dcso-vpn.nix
new file mode 100644
index 000000000..0a5623bf0
--- /dev/null
+++ b/lass/2configs/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;
+ };
+ };
+}