nix/container/Change.nix
2024-06-09 16:11:25 +03:00

32 lines
622 B
Nix

{ storage
, domain
, mkContainer
, mkContainerConfig
, mkContainerDir
, ... } @args: let
address = "10.1.0.41";
path = "${storage}/change";
in {
systemd.tmpfiles.rules = map (dir: mkContainerDir "${path}/${dir}") [
"data"
];
containers.change = mkContainer address {
bindMounts = {
"/var/lib/changedetection-io" = {
hostPath = "${path}/data";
isReadOnly = false;
};
};
config = { ... }: mkContainerConfig {
services.changedetection-io = {
enable = true;
baseURL = "https://change.${domain}";
behindProxy = true;
listenAddress = address;
};
};
};
}