mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
Summary Adds a NixOS module for running Remark42 as a systemd service and a NixOS VM test to ensure it starts and serves the built-in /web/ page. Changes - Add services.remark42 module (nixos/modules/services/web-apps/remark42.nix) - Core options: remarkUrl, sites, listenAddress, port, dataDir - environmentFile for secrets and settings for additional environment variables - Register module in nixos/modules/module-list.nix - Add NixOS test nixos/tests/remark42.nix and register it in nixos/tests/all-tests.nix - Add release note entry for the new module (NixOS 26.05) Testing `nix-build -A nixosTests.remark42`
31 lines
607 B
Nix
31 lines
607 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
name = "remark42";
|
|
|
|
nodes.machine =
|
|
{ ... }:
|
|
{
|
|
environment.systemPackages = [ pkgs.curl ];
|
|
|
|
services.remark42 = {
|
|
enable = true;
|
|
remarkUrl = "http://127.0.0.1:8080";
|
|
sites = [ "remark" ];
|
|
|
|
environmentFile = pkgs.writeText "remark42.env" ''
|
|
SECRET=unit-test-secret
|
|
'';
|
|
|
|
settings.AUTH_ANON = "true";
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
start_all()
|
|
machine.wait_for_unit("remark42.service")
|
|
machine.wait_for_open_port(8080)
|
|
machine.succeed("curl -fsS http://127.0.0.1:8080/web/ | head")
|
|
'';
|
|
}
|