mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
nixos/open-web-calendar: init module
(cherry picked from commit 897954b8ae
)
This commit is contained in:
parent
d2496adbfa
commit
9a5238a2ff
4 changed files with 215 additions and 0 deletions
|
@ -746,6 +746,7 @@ in {
|
|||
openstack-image-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {};
|
||||
opentabletdriver = handleTest ./opentabletdriver.nix {};
|
||||
opentelemetry-collector = handleTest ./opentelemetry-collector.nix {};
|
||||
open-web-calendar = handleTest ./web-apps/open-web-calendar.nix {};
|
||||
ocsinventory-agent = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./ocsinventory-agent.nix {};
|
||||
owncast = handleTest ./owncast.nix {};
|
||||
outline = handleTest ./outline.nix {};
|
||||
|
|
51
nixos/tests/web-apps/open-web-calendar.nix
Normal file
51
nixos/tests/web-apps/open-web-calendar.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
import ../make-test-python.nix (
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
certs = import ../common/acme/server/snakeoil-certs.nix;
|
||||
|
||||
serverDomain = certs.domain;
|
||||
in
|
||||
{
|
||||
name = "open-web-calendar";
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ erictapen ];
|
||||
|
||||
nodes.server =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
services.open-web-calendar = {
|
||||
enable = true;
|
||||
domain = serverDomain;
|
||||
calendarSettings.title = "My custom title";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${serverDomain}" = {
|
||||
enableACME = lib.mkForce false;
|
||||
sslCertificate = certs."${serverDomain}".cert;
|
||||
sslCertificateKey = certs."${serverDomain}".key;
|
||||
};
|
||||
|
||||
security.pki.certificateFiles = [ certs.ca.cert ];
|
||||
|
||||
networking.hosts."::1" = [ "${serverDomain}" ];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
};
|
||||
|
||||
nodes.client =
|
||||
{ pkgs, nodes, ... }:
|
||||
{
|
||||
networking.hosts."${nodes.server.networking.primaryIPAddress}" = [ "${serverDomain}" ];
|
||||
|
||||
security.pki.certificateFiles = [ certs.ca.cert ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
server.wait_for_unit("open-web-calendar.socket")
|
||||
server.wait_until_succeeds("curl -f https://${serverDomain}/ | grep 'My custom title'")
|
||||
'';
|
||||
}
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue