clightning: native database replication

Don't put `clightning.replication` options in
`examples/configuration.nix` until it is more "battle-tested."
This commit is contained in:
nixbitcoin 2022-01-06 12:40:52 +00:00
parent 55fc77d72f
commit 17507835fc
No known key found for this signature in database
GPG key ID: B6044ECBA2DAE5D0
11 changed files with 538 additions and 9 deletions

View file

@ -55,10 +55,29 @@ name: testConfig:
container = {
# The container name has a 11 char length limit
containers.nb-test = { config, ... }: {
config = {
extra = config.config.test.container;
config = testConfig;
};
imports = [
{
config = {
extra = config.config.test.container;
config = testConfig;
};
}
# Enable FUSE inside the container when clightning replication
# is enabled.
# TODO-EXTERNAL: Remove this when
# https://github.com/systemd/systemd/issues/17607
# has been resolved. This will also improve security.
(
let
clightning = config.config.services.clightning;
in
lib.mkIf (clightning.enable && clightning.replication.enable) {
bindMounts."/dev/fuse" = { hostPath = "/dev/fuse"; };
allowedDevices = [ { node = "/dev/fuse"; modifier = "rw"; } ];
}
)
];
};
};