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
|
address1 = "0.0.0.0"; # All
|
||||||
address2 = "192.168.50.1"; # Router
|
address2 = "192.168.50.1"; # Router
|
||||||
address3 = "192.168.50.0"; # Router
|
address3 = "192.168.50.0"; # Router
|
||||||
|
address4 = "192.168.1.0"; # Router
|
||||||
};
|
};
|
||||||
remotehost = {
|
remotehost = {
|
||||||
address0 = "24.76.173.0";
|
address0 = "24.76.173.0";
|
||||||
|
|
|
@ -14,6 +14,7 @@ in
|
||||||
path0 = "${sopsPath}/${name}";
|
path0 = "${sopsPath}/${name}";
|
||||||
};
|
};
|
||||||
ports = {
|
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
|
wayland
|
||||||
searx
|
searx
|
||||||
flatpak
|
flatpak
|
||||||
wireGuard
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -33,7 +32,6 @@ in
|
||||||
sddm
|
sddm
|
||||||
flatpak
|
flatpak
|
||||||
espanso
|
espanso
|
||||||
wireGuard
|
|
||||||
glance
|
glance
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
@ -44,7 +42,6 @@ in
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
plasma
|
plasma
|
||||||
sddm
|
sddm
|
||||||
wireGuard
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -70,15 +67,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mantle = {
|
|
||||||
imports = builtins.attrValues {
|
|
||||||
inherit (modules)
|
|
||||||
sops
|
|
||||||
xserver
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
crust = {
|
crust = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
inherit (modules)
|
||||||
|
@ -88,6 +76,15 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mantle = {
|
||||||
|
imports = builtins.attrValues {
|
||||||
|
inherit (modules)
|
||||||
|
sops
|
||||||
|
xserver
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
core = {
|
core = {
|
||||||
imports = builtins.attrValues {
|
imports = builtins.attrValues {
|
||||||
inherit (modules)
|
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
|
in
|
||||||
{
|
{
|
||||||
port = configHelpers.service.ports.port0;
|
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;
|
secret_key = config.sops.secrets.searx-key.path;
|
||||||
limiter = false;
|
limiter = false;
|
||||||
public_instance = 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
|
let
|
||||||
inherit (flake.config.machines.devices) ceres;
|
inherit (flake.config.machines.devices) ceres mars;
|
||||||
inherit (flake.config.services.instances) searx web;
|
inherit (flake.config.services.instances) searx web;
|
||||||
configHelpers = {
|
configHelpers = {
|
||||||
service = searx;
|
service = searx;
|
||||||
|
@ -47,8 +47,9 @@ in
|
||||||
"${configHelpers.host}" = {
|
"${configHelpers.host}" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
@allowed_ips {
|
@allowed_ips {
|
||||||
remote_ip 10.100.0.2
|
remote_ip ${mars.wireguard.ip0}
|
||||||
}
|
}
|
||||||
|
|
||||||
handle @allowed_ips {
|
handle @allowed_ips {
|
||||||
redir /.well-known/carddav /remote.php/dav/ 301
|
redir /.well-known/carddav /remote.php/dav/ 301
|
||||||
redir /.well-known/caldav /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, ... }:
|
{ config, flake, ... }:
|
||||||
let
|
let
|
||||||
inherit (flake.config.services.instances) wireGuard web;
|
inherit (flake.config.services.instances) wireGuard searx;
|
||||||
inherit (flake.config.machines.devices) mars ceres;
|
inherit (flake.config.machines.devices) mars ceres;
|
||||||
service = wireGuard;
|
service = wireGuard;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedUDPPorts = [
|
allowedTCPPorts = [
|
||||||
53
|
|
||||||
service.ports.port0
|
service.ports.port0
|
||||||
];
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
service.ports.port0
|
||||||
|
service.ports.port1
|
||||||
|
];
|
||||||
interfaces.wg0.allowedTCPPorts = [
|
interfaces.wg0.allowedTCPPorts = [
|
||||||
80
|
searx.ports.port0
|
||||||
443
|
|
||||||
8080
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ in
|
||||||
wireguard.interfaces = {
|
wireguard.interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
ips = [ "${ceres.wireguard.ip0}/24" ];
|
ips = [ "${ceres.wireguard.ip0}/24" ];
|
||||||
listenPort = service.ports.port0;
|
listenPort = service.ports.port1;
|
||||||
privateKeyFile = config.sops.secrets."${service.name}-private".path;
|
privateKeyFile = config.sops.secrets."${service.name}-private".path;
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,23 +1,27 @@
|
||||||
{ config, flake, ... }:
|
{ config, flake, ... }:
|
||||||
let
|
let
|
||||||
inherit (flake.config.services.instances) wireGuard web;
|
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;
|
service = wireGuard;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
wg-quick.interfaces = {
|
hosts = {
|
||||||
|
${ceres.wireguard.ip0} = [ instances.searx.domains.url0 ];
|
||||||
|
};
|
||||||
|
wireguard.interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
address = [ "${mars.wireguard.ip0}/24" ];
|
ips = [ "${mars.wireguard.ip0}/32" ];
|
||||||
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
|
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
|
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
|
||||||
allowedIPs = [
|
allowedIPs = [
|
||||||
"10.100.0.0/24"
|
"${ceres.wireguard.ip0}/32"
|
||||||
"192.168.1.0/24"
|
"${web.localhost.address4}/24"
|
||||||
];
|
];
|
||||||
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port0}";
|
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue