strukturbot: move to quitte
This commit is contained in:
parent
826758e138
commit
81a83d7989
|
@ -91,7 +91,7 @@
|
|||
./modules/fsrewsp.nix
|
||||
./modules/nightline.nix
|
||||
./modules/decisions.nix
|
||||
# ./modules/struktur-bot.nix
|
||||
./modules/struktur-bot.nix
|
||||
{
|
||||
nixpkgs.overlays = [ self.overlays.default ];
|
||||
sops.defaultSopsFile = ./secrets/quitte.yaml;
|
||||
|
|
32
modules/struktur-bot.nix
Normal file
32
modules/struktur-bot.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
sops.secrets."strukturbot_env" = { };
|
||||
virtualisation.docker.daemon.settings.dns = ["141.30.1.1" "141.76.14.1"];
|
||||
virtualisation.oci-containers = {
|
||||
containers.struktur-bot = {
|
||||
image = "struktur-bot";
|
||||
environmentFiles = [
|
||||
config.sops.secrets."strukturbot_env".path
|
||||
];
|
||||
extraOptions = [ "--network=host" ];
|
||||
};
|
||||
};
|
||||
systemd.timers."overleaf-backup" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "02:22:00";
|
||||
Unit = "overleaf-backup.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."overleaf-backup" = {
|
||||
script = ''
|
||||
set -eu
|
||||
${pkgs.docker}/bin/docker exec struktur-bot python3 backup.py
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue