treewide: lay base for shared configuration with darwin machines
This commit is contained in:
parent
73a5e1e56e
commit
3f958ff6d6
10 changed files with 57 additions and 74 deletions
|
@ -128,26 +128,6 @@ in
|
|||
];
|
||||
};
|
||||
};
|
||||
services = {
|
||||
udp2raw-server = lib.mkIf config.chvp.base.network.wireguard.server {
|
||||
description = "UDP tunnel over TCP for wireguard";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
${pkgs.udp2raw}/bin/udp2raw -s -l 0.0.0.0:8080 -r 127.0.0.1:51820 \
|
||||
-k "$(cat ${config.age.secrets."files/wireguard/udp2raw".path})"
|
||||
'';
|
||||
};
|
||||
udp2raw-client = lib.mkIf config.chvp.base.network.wireguard.onCorporate {
|
||||
description = "UDP tunnel over TCP for wireguard";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
script = ''
|
||||
${pkgs.udp2raw}/bin/udp2raw -c -l 127.0.0.1:51820 -r 54.38.222.69:8080 \
|
||||
-k "$(cat ${config.age.secrets."files/wireguard/udp2raw".path})"
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
age.secrets."files/wireguard/psk" = {
|
||||
file = ../../../secrets/files/wireguard/psk.age;
|
||||
|
@ -157,6 +137,5 @@ in
|
|||
file = ../../../secrets/files/wireguard + "/${config.networking.hostName}.privkey.age";
|
||||
owner = "systemd-network";
|
||||
};
|
||||
age.secrets."files/wireguard/udp2raw".file = ../../../secrets/files/wireguard/udp2raw.age;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue