architect: Delete lezzo module

This commit is contained in:
Giulio De Pasquale 2023-03-28 18:08:46 +02:00
parent 1bb71f7466
commit 811aa664a0

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}
'';
}