big staging update

Signed-off-by: s0me1newithhand7s <git+me@hand7s.org>
This commit is contained in:
s0me1newithhand7s 2025-12-29 16:42:07 +03:00
parent 0bf4c9cfca
commit 2939b08891
324 changed files with 6897 additions and 6797 deletions

View file

@ -1,50 +1,50 @@
{
config,
pkgs,
lib,
...
config,
pkgs,
lib,
...
}: {
networking = {
wg-quick = {
interfaces = {
wg0 = {
type = "wireguard";
listenPort = 53590;
privateKeyFile = config.sops.secrets.privateWgKey;
networking = {
wg-quick = {
interfaces = {
wg0 = {
type = "wireguard";
listenPort = 53590;
privateKeyFile = config.sops.secrets.privateWgKey;
address = [
"10.100.0.1/24"
];
address = [
"10.100.0.1/24"
];
postUp = ''
${lib.getExe' pkgs.iptables "iptables"} -A FORWARD -i wg0 -j ACCEPT
${lib.getExe' pkgs.iptables "iptables"} -t nat -A POSTROUTING -s 10.100.0.0/24 -o ens3 -j MASQUERADE
'';
postUp = ''
${lib.getExe' pkgs.iptables "iptables"} -A FORWARD -i wg0 -j ACCEPT
${lib.getExe' pkgs.iptables "iptables"} -t nat -A POSTROUTING -s 10.100.0.0/24 -o ens3 -j MASQUERADE
'';
preDown = ''
${lib.getExe' pkgs.iptables "iptables"} -D FORWARD -i wg0 -j ACCEPT
${lib.getExe' pkgs.iptables "iptables"} -t nat -D POSTROUTING -s 10.100.0.0/24 -o ens3 -j MASQUERADE
'';
preDown = ''
${lib.getExe' pkgs.iptables "iptables"} -D FORWARD -i wg0 -j ACCEPT
${lib.getExe' pkgs.iptables "iptables"} -t nat -D POSTROUTING -s 10.100.0.0/24 -o ens3 -j MASQUERADE
'';
peers = [
{
publicKey = "{}";
presharedKeyFile = config.sops.secrets.presharedWgKey1;
allowedIPs = [
"10.100.0.2/32"
];
}
peers = [
{
publicKey = "{}";
presharedKeyFile = config.sops.secrets.presharedWgKey1;
allowedIPs = [
"10.100.0.2/32"
];
}
{
publicKey = "{}";
presharedKeyFile = config.sops.secrets.presharedWgKey2;
allowedIPs = [
"10.100.0.3/32"
];
}
];
};
};
{
publicKey = "{}";
presharedKeyFile = config.sops.secrets.presharedWgKey2;
allowedIPs = [
"10.100.0.3/32"
];
}
];
};
};
};
};
}