nix/container/Change.nix

35 lines
592 B
Nix
Raw Normal View History

2024-06-01 10:37:49 +03:00
{ pkgs
, storage
, const
, domain
, host
, util
, 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 = {
"/datastore" = {
hostPath = "${path}/data";
isReadOnly = false;
};
};
config = { config, lib, pkgs, ... }: mkContainerConfig {
services.changedetection-io = {
enable = true;
};
};
};
}