Files
nixpkgs/nixos/tests/onlyoffice.nix
NAHO a2ed7e8d88 nixos: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd \
      --exclude doc/manual/release-notes \
      --type file \
      . \
      nixos \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
2026-01-15 16:07:55 +01:00

31 lines
713 B
Nix

let
port = 8000;
in
{
name = "onlyoffice";
nodes.machine =
{ pkgs, ... }:
{
services.onlyoffice = {
enable = true;
inherit port;
hostname = "office.example.com";
securityNonceFile = "${pkgs.writeText "nixos-test-onlyoffice-nonce.conf" ''
set $secure_link_secret "nixostest";
''}";
};
networking.hosts = {
"::1" = [ "office.example.com" ];
};
};
testScript = ''
machine.wait_for_unit("onlyoffice-docservice.service")
machine.wait_for_unit("onlyoffice-converter.service")
machine.wait_for_open_port(${toString port})
machine.succeed("curl --fail http://office.example.com/healthcheck")
'';
}