Unverified Commit bb36fbdc authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

Merge master into staging-nixos

parents 67a1e656 61412055
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -40,9 +40,12 @@ in

    cageArgs = lib.mkOption {
      type = lib.types.listOf lib.types.str;
      default = [ "-s" ];
      default = [
        "-s"
        "-d"
      ];
      example = lib.literalExpression ''
        [ "-s" "-m" "last" ]
        [ "-s" "-d" "-m" "last" ]
      '';
      description = ''
        Additional arguments to be passed to
+367 −81

File changed.

Preview size limit exceeded, changes collapsed.

+7 −2
Original line number Diff line number Diff line
@@ -1029,10 +1029,15 @@ in
  nbd = runTest ./nbd.nix;
  ncdns = runTest ./ncdns.nix;
  ncps = runTest ./ncps.nix;
  ncps-custom-cache-datapath = runTest {
  ncps-custom-sqlite-directory = runTest {
    imports = [ ./ncps.nix ];
    defaults.services.ncps.cache.dataPath = "/path/to/ncps";
    defaults.services.ncps.cache.databaseURL = "sqlite:/path/to/ncps/db.sqlite";
  };
  ncps-custom-storage-local = runTest {
    imports = [ ./ncps.nix ];
    defaults.services.ncps.cache.storage.local = "/path/to/ncps";
  };
  ncps-ha = runTest ./ncps-ha.nix;
  ndppd = runTest ./ndppd.nix;
  nebula-lighthouse-service = runTest ./nebula-lighthouse-service.nix;
  nebula.connectivity = runTest ./nebula/connectivity.nix;
+218 −0

File added.

Preview size limit exceeded, changes collapsed.

+19 −11
Original line number Diff line number Diff line
@@ -6,6 +6,12 @@

{
  name = "ncps";
  meta = with lib.maintainers; {
    maintainers = [
      aciceri
      kalbasit
    ];
  };

  nodes = {
    harmonia = {
@@ -25,25 +31,27 @@
      services.ncps = {
        enable = true;

        analytics.reporting.enable = false;

        cache = {
          hostName = "ncps";
          secretKeyPath = toString (
            pkgs.writeText "ncps-cache-key" "ncps:dcrGsrku0KvltFhrR5lVIMqyloAdo0y8vYZOeIFUSLJS2IToL7dPHSSCk/fi+PJf8EorpBn8PU7MNhfvZoI8mA=="
          );
        };

          upstream = {
          caches = [ "http://harmonia:5000" ];
            urls = [ "http://harmonia:5000" ];
            publicKeys = [
              "cache.example.com-1:eIGQXcGQpc00x6/XFcyacLEUmC07u4RAEHt5Y8vdglo="
            ];
          };
        };
      };

      networking.firewall.allowedTCPPorts = [ 8501 ];
    };

    client01 = {
    client = {
      nix.settings = {
        substituters = lib.mkForce [ "http://ncps:8501" ];
        trusted-public-keys = lib.mkForce [
@@ -65,7 +73,7 @@
      narinfoNameChars = lib.strings.stringToCharacters narinfoName;

      narinfoPath = lib.concatStringsSep "/" [
        nodes.ncps.services.ncps.cache.dataPath
        nodes.ncps.services.ncps.cache.storage.local
        "store/narinfo"
        (lib.lists.elemAt narinfoNameChars 0)
        ((lib.lists.elemAt narinfoNameChars 0) + (lib.lists.elemAt narinfoNameChars 1))
@@ -79,10 +87,10 @@

      ncps.wait_for_unit("ncps.service")

      client01.wait_until_succeeds("curl -f http://ncps:8501/ | grep '\"hostname\":\"${toString nodes.ncps.services.ncps.cache.hostName}\"' >&2")
      client.wait_until_succeeds("curl -f http://ncps:8501/ | grep '\"hostname\":\"${toString nodes.ncps.services.ncps.cache.hostName}\"' >&2")

      client01.succeed("cat /etc/nix/nix.conf >&2")
      client01.succeed("nix-store --realise ${pkgs.emptyFile}")
      client.succeed("cat /etc/nix/nix.conf >&2")
      client.succeed("nix-store --realise ${pkgs.emptyFile}")

      ncps.succeed("cat ${narinfoPath} >&2")
    '';
Loading