all repos — nixfiles @ f01eda735de337e88df339eb6cf772c618ec84df

System and user configuration, managed by nix and home-manager

system/roles/push-notifications.nix (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  config,
  ...
}:
{
  services.caddy.virtualHosts = {
    "notify.${config.networking.domain}" = {
      extraConfig = ''
        reverse_proxy ${config.services.bark.settings.BARK_SERVER_ADDRESS} {
          health_uri /ping
          health_body pong
        }
      '';
    };
  };

  services.bark = {
    enable = true;
    settings = {
      BARK_SERVER_ADDRESS = "[::1]:8089";
    };
  };
}