Compare commits
2 commits
96c423a772
...
a2e3d507f9
Author | SHA1 | Date | |
---|---|---|---|
Tigor Hutasuhut | a2e3d507f9 | ||
Tigor Hutasuhut | 9bd73d059e |
|
@ -81,7 +81,7 @@ in
|
||||||
secretPlaceholder = config.sops.placeholder."openvpn/clients/phone";
|
secretPlaceholder = config.sops.placeholder."openvpn/clients/phone";
|
||||||
ifConfig = "10.8.1.1 10.8.1.2";
|
ifConfig = "10.8.1.1 10.8.1.2";
|
||||||
};
|
};
|
||||||
path = "/etc/openvpn/phone.ovpn";
|
path = "/nas/Syncthing/Sync/VPN/phone.ovpn";
|
||||||
owner = config.profile.user.name;
|
owner = config.profile.user.name;
|
||||||
};
|
};
|
||||||
"openvpn/key/laptop" = {
|
"openvpn/key/laptop" = {
|
||||||
|
@ -89,7 +89,7 @@ in
|
||||||
secretPlaceholder = config.sops.placeholder."openvpn/clients/laptop";
|
secretPlaceholder = config.sops.placeholder."openvpn/clients/laptop";
|
||||||
ifConfig = "10.8.2.1 10.8.2.2";
|
ifConfig = "10.8.2.1 10.8.2.2";
|
||||||
};
|
};
|
||||||
path = "/etc/openvpn/laptop.ovpn";
|
path = "/nas/Syncthing/Sync/VPN/laptop.ovpn";
|
||||||
owner = config.profile.user.name;
|
owner = config.profile.user.name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -98,6 +98,9 @@ in
|
||||||
config = ''
|
config = ''
|
||||||
dev ${vpn-dev}
|
dev ${vpn-dev}
|
||||||
proto udp
|
proto udp
|
||||||
|
status /tmp/openvpn-status.log
|
||||||
|
|
||||||
|
comp-lzo no
|
||||||
|
|
||||||
tls-server
|
tls-server
|
||||||
cipher AES-256-CBC
|
cipher AES-256-CBC
|
||||||
|
@ -105,7 +108,6 @@ in
|
||||||
|
|
||||||
server 10.10.10.0 255.255.255.0
|
server 10.10.10.0 255.255.255.0
|
||||||
|
|
||||||
allow-compression no
|
|
||||||
ca ${config.sops.secrets."openvpn/server/ca".path}
|
ca ${config.sops.secrets."openvpn/server/ca".path}
|
||||||
cert ${config.sops.secrets."openvpn/server/cert".path}
|
cert ${config.sops.secrets."openvpn/server/cert".path}
|
||||||
key ${config.sops.secrets."openvpn/server/key".path}
|
key ${config.sops.secrets."openvpn/server/key".path}
|
||||||
|
@ -116,6 +118,10 @@ in
|
||||||
ping-timer-rem
|
ping-timer-rem
|
||||||
persist-tun
|
persist-tun
|
||||||
persist-key
|
persist-key
|
||||||
|
|
||||||
|
push "block-outside-dns"
|
||||||
|
push "dhcp-option 192.168.100.3"
|
||||||
|
push "comp-lzo no"
|
||||||
'';
|
'';
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,6 +41,9 @@ in
|
||||||
"/nas/redmage/images/laptop-kerja" = {
|
"/nas/redmage/images/laptop-kerja" = {
|
||||||
label = "Redmage/Laptop-Kerja";
|
label = "Redmage/Laptop-Kerja";
|
||||||
id = "Redmage/Laptop-Kerja";
|
id = "Redmage/Laptop-Kerja";
|
||||||
|
devices = [
|
||||||
|
"work-laptop"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
"/nas/redmage/images/s20fe-sfw" = {
|
"/nas/redmage/images/s20fe-sfw" = {
|
||||||
label = "Redmage/S20FE";
|
label = "Redmage/S20FE";
|
||||||
|
@ -65,6 +68,11 @@ in
|
||||||
"onyx"
|
"onyx"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
"/nas/Syncthing/Sync/VPN" = {
|
||||||
|
label = "OpenVPN";
|
||||||
|
id = "OpenVPN";
|
||||||
|
devices = lib.attrsets.mapAttrsToList (key: _value: key) config.services.syncthing.settings.devices;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
devices = {
|
devices = {
|
||||||
s20fe = {
|
s20fe = {
|
||||||
|
@ -82,6 +90,11 @@ in
|
||||||
id = "FSTIYS6-REFXIJX-KPLYC4L-QSZO46L-RV3VTPZ-VWVTE7O-Y663OZN-RTKP3QI";
|
id = "FSTIYS6-REFXIJX-KPLYC4L-QSZO46L-RV3VTPZ-VWVTE7O-Y663OZN-RTKP3QI";
|
||||||
autoAcceptFolders = true;
|
autoAcceptFolders = true;
|
||||||
};
|
};
|
||||||
|
work-laptop = {
|
||||||
|
name = "Work Laptop";
|
||||||
|
id = "BOU76IK-5AE7ARF-ZQDFOTX-KWUQL22-SAGXBYG-B75JRZA-L4MCYPU-OYTY5AU";
|
||||||
|
autoAcceptFolders = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
overrideFolders = true;
|
overrideFolders = true;
|
||||||
|
|
Loading…
Reference in a new issue