mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 21:04:38 -05:00
Compare commits
17 commits
31c2843393
...
d73b1c5abe
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d73b1c5abe | ||
![]() |
f9e0ffb400 | ||
![]() |
d7360e2e63 | ||
![]() |
baa7cfc6f8 | ||
![]() |
1c4228ad60 | ||
![]() |
67892565eb | ||
![]() |
9c69449a55 | ||
![]() |
1d9097408c | ||
![]() |
8b9ece1b4e | ||
![]() |
6fb7b5504d | ||
![]() |
9c8890926e | ||
![]() |
c6c3e4b3a4 | ||
![]() |
c6ea717181 | ||
![]() |
93366c81c8 | ||
![]() |
3ffa8c9db0 | ||
![]() |
f240fddd73 | ||
![]() |
b04a752443 |
15 changed files with 57 additions and 29 deletions
|
@ -22,6 +22,7 @@ in
|
|||
address1 = "0.0.0.0"; # All
|
||||
address2 = "192.168.50.1"; # Router
|
||||
address3 = "192.168.50.0"; # Router
|
||||
address4 = "192.168.1.0"; # Router
|
||||
};
|
||||
remotehost = {
|
||||
address0 = "24.76.173.0";
|
||||
|
|
|
@ -14,6 +14,7 @@ in
|
|||
path0 = "${sopsPath}/${name}";
|
||||
};
|
||||
ports = {
|
||||
port0 = 51821;
|
||||
port0 = 53;
|
||||
port1 = 51821;
|
||||
};
|
||||
}
|
||||
|
|
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
|
||||
;
|
||||
};
|
||||
}
|
11
modules/home/cli/utilities/ipTables/default.nix
Normal file
11
modules/home/cli/utilities/ipTables/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
iptables
|
||||
;
|
||||
};
|
||||
}
|
|
@ -18,7 +18,6 @@ in
|
|||
wayland
|
||||
searx
|
||||
flatpak
|
||||
wireGuard
|
||||
;
|
||||
};
|
||||
};
|
||||
|
@ -33,7 +32,6 @@ in
|
|||
sddm
|
||||
flatpak
|
||||
espanso
|
||||
wireGuard
|
||||
glance
|
||||
;
|
||||
};
|
||||
|
@ -44,7 +42,6 @@ in
|
|||
inherit (modules)
|
||||
plasma
|
||||
sddm
|
||||
wireGuard
|
||||
;
|
||||
};
|
||||
};
|
||||
|
@ -70,15 +67,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
mantle = {
|
||||
imports = builtins.attrValues {
|
||||
inherit (modules)
|
||||
sops
|
||||
xserver
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
crust = {
|
||||
imports = builtins.attrValues {
|
||||
inherit (modules)
|
||||
|
@ -88,6 +76,15 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
mantle = {
|
||||
imports = builtins.attrValues {
|
||||
inherit (modules)
|
||||
sops
|
||||
xserver
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
core = {
|
||||
imports = builtins.attrValues {
|
||||
inherit (modules)
|
||||
|
|
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
3
modules/nixos/services/searx/config/server.nix
Normal file → Executable file
3
modules/nixos/services/searx/config/server.nix
Normal file → Executable file
|
@ -9,7 +9,8 @@ let
|
|||
in
|
||||
{
|
||||
port = configHelpers.service.ports.port0;
|
||||
bind_address = ceres.wireguard.ip0;
|
||||
bind_address =
|
||||
if configHelpers.hostname == ceres.name then ceres.wireguard.ip0 else configHelpers.localhost;
|
||||
secret_key = config.sops.secrets.searx-key.path;
|
||||
limiter = false;
|
||||
public_instance = false;
|
||||
|
|
0
modules/nixos/services/searx/config/ui.nix
Normal file → Executable file
0
modules/nixos/services/searx/config/ui.nix
Normal file → Executable file
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.machines.devices) ceres;
|
||||
inherit (flake.config.machines.devices) ceres mars;
|
||||
inherit (flake.config.services.instances) searx web;
|
||||
configHelpers = {
|
||||
service = searx;
|
||||
|
@ -47,8 +47,9 @@ in
|
|||
"${configHelpers.host}" = {
|
||||
extraConfig = ''
|
||||
@allowed_ips {
|
||||
remote_ip 10.100.0.2
|
||||
remote_ip ${mars.wireguard.ip0}
|
||||
}
|
||||
|
||||
handle @allowed_ips {
|
||||
redir /.well-known/carddav /remote.php/dav/ 301
|
||||
redir /.well-known/caldav /remote.php/dav/ 301
|
||||
|
|
15
systems/ceres/config/wireguard.nix
Normal file → Executable file
15
systems/ceres/config/wireguard.nix
Normal file → Executable file
|
@ -1,20 +1,21 @@
|
|||
{ config, flake, ... }:
|
||||
let
|
||||
inherit (flake.config.services.instances) wireGuard web;
|
||||
inherit (flake.config.services.instances) wireGuard searx;
|
||||
inherit (flake.config.machines.devices) mars ceres;
|
||||
service = wireGuard;
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedUDPPorts = [
|
||||
53
|
||||
allowedTCPPorts = [
|
||||
service.ports.port0
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
service.ports.port0
|
||||
service.ports.port1
|
||||
];
|
||||
interfaces.wg0.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
8080
|
||||
searx.ports.port0
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -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,23 +1,27 @@
|
|||
{ config, flake, ... }:
|
||||
let
|
||||
inherit (flake.config.services.instances) wireGuard web;
|
||||
inherit (flake.config.machines.devices) mars;
|
||||
inherit (flake.config.services) instances;
|
||||
inherit (flake.config.machines.devices) ceres mars;
|
||||
service = wireGuard;
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
wg-quick.interfaces = {
|
||||
hosts = {
|
||||
${ceres.wireguard.ip0} = [ instances.searx.domains.url0 ];
|
||||
};
|
||||
wireguard.interfaces = {
|
||||
wg0 = {
|
||||
address = [ "${mars.wireguard.ip0}/24" ];
|
||||
ips = [ "${mars.wireguard.ip0}/32" ];
|
||||
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"
|
||||
"${ceres.wireguard.ip0}/32"
|
||||
"${web.localhost.address4}/24"
|
||||
];
|
||||
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port0}";
|
||||
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue