mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 16:23:26 +00:00
e9fed4bcad
For now, just try creating a user with sojuctl. Actually connecting an irc client is pretty annoying.
32 lines
700 B
Nix
32 lines
700 B
Nix
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
|
let
|
|
certs = import ./common/acme/server/snakeoil-certs.nix;
|
|
domain = certs.domain;
|
|
|
|
user = "testuser";
|
|
pass = "hunter2";
|
|
in
|
|
{
|
|
name = "soju";
|
|
meta.maintainers = with lib.maintainers; [ Benjamin-L ];
|
|
|
|
nodes.machine = { ... }: {
|
|
services.soju = {
|
|
enable = true;
|
|
adminSocket.enable = true;
|
|
hostName = domain;
|
|
tlsCertificate = certs.${domain}.cert;
|
|
tlsCertificateKey = certs.${domain}.key;
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
|
|
machine.wait_for_unit("soju")
|
|
machine.wait_for_file("/run/soju/admin")
|
|
|
|
machine.succeed("sojuctl user create -username ${user} -password ${pass}")
|
|
'';
|
|
})
|