summaryrefslogtreecommitdiffstats
path: root/nixos/tests/readeck.nix
blob: bcac4b152b12e964165bae3f178d9babd0e672ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ lib, ... }:

{
  name = "readeck";
  meta.maintainers = with lib.maintainers; [ julienmalka ];

  nodes.machine =
    { pkgs, ... }:
    {
      services.readeck = {
        enable = true;
        environmentFile = pkgs.writeText "env-file" ''
          READECK_SECRET_KEY="verysecretkey"
        '';
      };
    };

  testScript = ''
    machine.start()
    machine.wait_for_unit("readeck.service")
    machine.wait_for_open_port(8000)
    machine.succeed("curl --fail http://localhost:8000/login?r=%2F")
  '';
}