mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 21:04:38 -05:00
feat: wireguard test
This commit is contained in:
parent
f9e0ffb400
commit
d73b1c5abe
2 changed files with 15 additions and 1 deletions
11
modules/home/cli/utilities/dig/default.nix
Normal file
11
modules/home/cli/utilities/dig/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.packages = builtins.attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
dig
|
||||||
|
;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,11 +1,15 @@
|
||||||
{ config, flake, ... }:
|
{ config, flake, ... }:
|
||||||
let
|
let
|
||||||
inherit (flake.config.services.instances) wireGuard web;
|
inherit (flake.config.services.instances) wireGuard web;
|
||||||
|
inherit (flake.config.services) instances;
|
||||||
inherit (flake.config.machines.devices) ceres mars;
|
inherit (flake.config.machines.devices) ceres mars;
|
||||||
service = wireGuard;
|
service = wireGuard;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
|
hosts = {
|
||||||
|
${ceres.wireguard.ip0} = [ instances.searx.domains.url0 ];
|
||||||
|
};
|
||||||
wireguard.interfaces = {
|
wireguard.interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
ips = [ "${mars.wireguard.ip0}/32" ];
|
ips = [ "${mars.wireguard.ip0}/32" ];
|
||||||
|
@ -16,7 +20,6 @@ in
|
||||||
allowedIPs = [
|
allowedIPs = [
|
||||||
"${ceres.wireguard.ip0}/32"
|
"${ceres.wireguard.ip0}/32"
|
||||||
"${web.localhost.address4}/24"
|
"${web.localhost.address4}/24"
|
||||||
"${web.remotehost.address0}/32"
|
|
||||||
];
|
];
|
||||||
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
|
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue