mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 04:44:39 -05:00
feat: wireguard test
This commit is contained in:
parent
93366c81c8
commit
c6ea717181
11 changed files with 26 additions and 22 deletions
|
@ -14,6 +14,7 @@ in
|
|||
path0 = "${sopsPath}/${name}";
|
||||
};
|
||||
ports = {
|
||||
port0 = 51821;
|
||||
port0 = 51820;
|
||||
port1 = 51821;
|
||||
};
|
||||
}
|
||||
|
|
0
modules/nixos/services/searx/config/engines.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/engines.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/general.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/general.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/outgoing.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/outgoing.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/plugins.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/plugins.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/search.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/search.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/server.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/server.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/ui.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/ui.nix
Normal file → Executable file
|
@ -49,8 +49,11 @@ in
|
|||
@allowed_ips {
|
||||
remote_ip ${mars.wireguard.ip0}
|
||||
}
|
||||
|
||||
handle @allowed_ips {
|
||||
reverse_proxy unix//run/searx/searx.sock
|
||||
redir /.well-known/carddav /remote.php/dav/ 301
|
||||
redir /.well-known/caldav /remote.php/dav/ 301
|
||||
reverse_proxy ${ceres.wireguard.ip0}:${toString configHelpers.service.ports.port0}
|
||||
}
|
||||
handle {
|
||||
respond "Access Denied" 403
|
||||
|
|
7
systems/ceres/config/wireguard.nix
Normal file → Executable file
7
systems/ceres/config/wireguard.nix
Normal file → Executable file
|
@ -1,6 +1,6 @@
|
|||
{ config, flake, ... }:
|
||||
let
|
||||
inherit (flake.config.services.instances) wireGuard web;
|
||||
inherit (flake.config.services.instances) wireGuard;
|
||||
inherit (flake.config.machines.devices) mars ceres;
|
||||
service = wireGuard;
|
||||
in
|
||||
|
@ -10,11 +10,12 @@ in
|
|||
allowedUDPPorts = [
|
||||
53
|
||||
service.ports.port0
|
||||
service.ports.port1
|
||||
];
|
||||
interfaces.wg0.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
8080
|
||||
8888
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -28,7 +29,7 @@ in
|
|||
wireguard.interfaces = {
|
||||
wg0 = {
|
||||
ips = [ "${ceres.wireguard.ip0}/24" ];
|
||||
listenPort = service.ports.port0;
|
||||
listenPort = service.ports.port1;
|
||||
privateKeyFile = config.sops.secrets."${service.name}-private".path;
|
||||
peers = [
|
||||
{
|
||||
|
|
|
@ -1,27 +1,26 @@
|
|||
{ config, flake, ... }:
|
||||
let
|
||||
inherit (flake.config.services.instances) wireGuard web;
|
||||
inherit (flake.config.machines.devices) mars;
|
||||
inherit (flake.config.machines.devices) ceres mars;
|
||||
service = wireGuard;
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
address = [ "${mars.wireguard.ip0}/24" ];
|
||||
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
|
||||
allowedIPs = [
|
||||
"10.100.0.0/24"
|
||||
"192.168.1.0/24"
|
||||
];
|
||||
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port0}";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
wireguard.interfaces.wg0 = {
|
||||
ips = [ "${mars.wireguard.ip0}/24" ];
|
||||
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
|
||||
allowedIPs = [
|
||||
"10.100.0.0/24"
|
||||
"${ceres.wireguard.ip0}/24"
|
||||
"192.168.1.0/24"
|
||||
];
|
||||
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue