Compare commits

...

3 Commits

Author SHA1 Message Date
Giulio De Pasquale
811aa664a0 architect: Delete lezzo module 2023-03-28 18:08:46 +02:00
Giulio De Pasquale
1bb71f7466 architect: Enable c2c for Francesco 2023-03-28 18:07:53 +02:00
Giulio De Pasquale
b57c039f70 architect: Disable lezzo 2023-03-28 18:07:14 +02:00
4 changed files with 8 additions and 49 deletions

View File

@ -37,7 +37,6 @@ in
#./calibre.nix
./docker.nix
./keycloak.nix
./lezzo.nix
./runas.nix
./tailscale.nix
./searx.nix

View File

@ -132,12 +132,17 @@ in
chain FORWARD {
type filter hook forward priority filter; policy drop;
ct state established,related accept
# client to client
ip saddr {${lib.concatStringsSep "," c2c-wg}} ip daddr {${
lib.concatStringsSep "," c2c-wg
}} accept
# nat to wan
oifname ${wan-if} ip saddr {${
lib.concatStringsSep "," towan-wg
}} accept
oifname ${wan-if} ip saddr ${docker-net} accept
oifname ${wan-if} ip saddr ${tailscale-net} accept

View File

@ -1,46 +0,0 @@
{ services, pkgs, lib, makeBinPath, ... }:
let
domain = "lezzo.org";
lezzo_root = "/var/lib/lezzo.org";
service_name = "lezzo-pull";
network = import ./network.nix;
mkStartScript = name: pkgs.writeShellScript "${name}.sh" ''
set -euo pipefail
cd ${lezzo_root}
git pull origin master --rebase
'';
in
{
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
root = lezzo_root;
locations."/.git" = { return = "404"; };
};
systemd = {
services.${service_name} = {
path = [ pkgs.git ];
enable = true;
serviceConfig = {
Type = "oneshot";
ExecStart = mkStartScript "${service_name}";
};
};
timers.${service_name} = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "hourly";
Unit = "${service_name}.service";
};
};
};
networking.extraHosts = ''
${network.architect-lan} ${domain}
${network.architect-wg} ${domain}
${network.architect-ts} ${domain}
'';
}

View File

@ -56,7 +56,8 @@ rec {
dodino-ts = "100.106.244.35";
framecca-devices = [ framecca-wg framecca_one-wg framecca_three-wg framecca_four-wg ];
c2c-wg = framecca-devices;
# groups
gdevices = [ giuliophone-ts architect-ts giuliopc-ts dodino-ts ];
towan-wg = [ shield-wg parina-wg parina-ipad-wg germano-wg ] ++ framecca-devices;