2021-05-15 11:13:13 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
port = 8631;
|
|
|
|
image = "bbernhard/signal-cli-rest-api:latest";
|
|
|
|
config = "/var/lib/signal-cli-config";
|
|
|
|
in {
|
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"d ${config} docker docker - -"
|
|
|
|
];
|
|
|
|
state = [ config ];
|
|
|
|
virtualisation.oci-containers.containers.signal-rest = {
|
|
|
|
image = image;
|
|
|
|
ports = [ "127.0.0.1:${toString port}:8080" ];
|
|
|
|
volumes = [
|
|
|
|
"${config}:/home/.local/share/signal-cli"
|
|
|
|
];
|
2022-09-23 21:41:30 +00:00
|
|
|
environment.MODE ="json-rpc";
|
|
|
|
#environment.MODE ="native"; # only required for reigstration
|
2021-05-15 11:13:13 +00:00
|
|
|
};
|
|
|
|
}
|