2024-06-09 15:31:53 +03:00
|
|
|
{ storage
|
|
|
|
, domain
|
2024-06-01 10:37:49 +03:00
|
|
|
, mkContainer
|
|
|
|
, mkContainerConfig
|
2024-06-09 15:31:53 +03:00
|
|
|
, mkContainerDir
|
2024-06-01 10:37:49 +03:00
|
|
|
, ... } @args: let
|
2024-06-09 15:31:53 +03:00
|
|
|
address = "10.1.0.41";
|
|
|
|
path = "${storage}/change";
|
2024-06-01 10:37:49 +03:00
|
|
|
in {
|
2024-06-09 15:31:53 +03:00
|
|
|
systemd.tmpfiles.rules = map (dir: mkContainerDir "${path}/${dir}") [
|
|
|
|
"data"
|
|
|
|
];
|
2024-06-01 10:37:49 +03:00
|
|
|
|
2024-06-09 15:31:53 +03:00
|
|
|
containers.change = mkContainer address {
|
2024-06-01 10:37:49 +03:00
|
|
|
bindMounts = {
|
2024-06-09 15:17:40 +03:00
|
|
|
"/var/lib/changedetection-io" = {
|
2024-06-01 10:37:49 +03:00
|
|
|
hostPath = "${path}/data";
|
|
|
|
isReadOnly = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-09 15:31:53 +03:00
|
|
|
config = { ... }: mkContainerConfig {
|
2024-06-01 10:37:49 +03:00
|
|
|
services.changedetection-io = {
|
2024-06-09 15:31:53 +03:00
|
|
|
enable = true;
|
|
|
|
baseURL = "https://change.${domain}";
|
|
|
|
behindProxy = true;
|
|
|
|
listenAddress = address;
|
2024-06-01 10:37:49 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|