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

32 lines
602 B
Nix

{ pkgs
, storage
, mkContainer
, mkContainerConfig
, ... } @args: let
path = "${storage}/change";
in {
systemd.tmpfiles.rules = map (
dirName: "d '${path}/${dirName}' 1777 root root - -"
) [ "data" ];
containers.change = mkContainer {
autoStart = true;
localAddress = "10.1.0.41";
privateNetwork = true;
bindMounts = {
"/var/lib/changedetection-io" = {
hostPath = "${path}/data";
isReadOnly = false;
};
};
config = { config, lib, pkgs, ... }: mkContainerConfig {
services.changedetection-io = {
enable = true;
behindProxy = true;
};
};
};
}