summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/nginx/euer.blog.vpn.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-12-18 21:27:26 +0100
committermakefu <github@syntax-fehler.de>2017-12-18 21:27:26 +0100
commite2369d551e211c0eeb360868c2bba30564e33ca0 (patch)
treec8c19f08e0ad3261eb43a99f32b35e7b8121fa52 /makefu/2configs/nginx/euer.blog.vpn.nix
parent4d4d11a76501246e485ed73f33277ce470d32dfd (diff)
ma vpn: add vpnws client and server
Diffstat (limited to 'makefu/2configs/nginx/euer.blog.vpn.nix')
-rw-r--r--makefu/2configs/nginx/euer.blog.vpn.nix35
1 files changed, 0 insertions, 35 deletions
diff --git a/makefu/2configs/nginx/euer.blog.vpn.nix b/makefu/2configs/nginx/euer.blog.vpn.nix
deleted file mode 100644
index b3db0bc60..000000000
--- a/makefu/2configs/nginx/euer.blog.vpn.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{pkgs, options, ... }:
-let
- pkg = pkgs.vpn-ws;
- uid = "nginx";
- gid = "nginx";
- ip = "${pkgs.iproute}/bin/ip";
-in {
- services.nginx.virtualHosts."euer.krebsco.de".locations."/vpn" = {
- # TODO client auth
- extraConfig = ''
- uwsgi_pass unix:/run/vpn.sock;
- include ${pkgs.nginx}/conf/uwsgi_params;
- '';
- };
-
- networking.interfaces.vpnws = {
- virtual = true;
- virtualType = "tap";
- };
- systemd.services.vpnws = {
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" ];
- serviceConfig = {
- Restart = "always";
- PrivateTmp = true;
- ExecStartPre = pkgs.writeDash "vpnws-pre" ''
- ${ip} link set vpnws up
- ${ip} addr add 10.244.1.1/24 dev vpnws || :
- '';
- ExecStart = pkgs.writeDash "vpnws-start" ''
- ${pkg}/bin/vpn-ws --tuntap vpnws /run/vpn.sock
- '';
- };
- };
-}