summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/signal-rest/service.nix
blob: 1f718efa5190bccc5b863cda691b6aa4f67951c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

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"
    ];
    environment.MODE ="json-rpc";
    #environment.MODE ="native"; # only required for reigstration
  };
}