Serveur photos Co-authored-by: sinavir <sinavir@sinavir.fr> Reviewed-on: https://git.rz.ens.wtf/Klub-RZ/nur/pulls/4 Co-authored-by: sinavir <maurice.debray@ens.fr> Co-committed-by: sinavir <maurice.debray@ens.fr>
31 lines
841 B
Nix
31 lines
841 B
Nix
{ pkgs ? import <nixpkgs> { }, myPkgs ? import ../.. { } }:
|
|
pkgs.nixosTest ({
|
|
# NixOS tests are run inside a virtual machine, and here we specify system of the machine.
|
|
nodes = {
|
|
server = { config, pkgs, ... }: {
|
|
imports = [ myPkgs.modules.lychee ];
|
|
|
|
security.acme.acceptTerms = true;
|
|
security.acme.defaults.email = "test@test.fr";
|
|
services.lychee = {
|
|
enable = true;
|
|
package = myPkgs.lychee-gallery;
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
};
|
|
environment.systemPackages = [ pkgs.w3m ];
|
|
|
|
users = {
|
|
mutableUsers = false;
|
|
users = {
|
|
# For ease of debugging the VM as the `root` user
|
|
root.password = "";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
testScript = ''
|
|
start_all()
|
|
server.wait_for_unit("phpfpm-localhost.service")
|
|
'';
|
|
})
|