about summary refs log tree commit diff
path: root/nixos/tests/headscale.nix
blob: 48658b5dade4271eed52af0ae9b3cc06e355b864 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import ./make-test-python.nix ({ pkgs, lib, ... }: {
  name = "headscale";
  meta.maintainers = with lib.maintainers; [ misterio77 ];

  nodes.machine = { ... }: {
    services.headscale.enable = true;
    environment.systemPackages = [ pkgs.headscale ];
  };

  testScript = ''
    machine.wait_for_unit("headscale")
    machine.wait_for_open_port(8080)
    # Test basic funcionality
    machine.succeed("headscale namespaces create test")
    machine.succeed("headscale preauthkeys -n test create")
  '';
})