15 (pkgs.writeText "cache-key" "cache.example.com-1:9FhO0w+7HjZrhvmzT1VlAZw4OSAlFGTgC24Seg3tmPl4gZBdwZClzTTHr9cVzJpwsRSYLTu7hEAQe3ljy92CWg==")
17 settings.priority = 35;
20 networking.firewall.allowedTCPPorts = [ 5000 ];
21 system.extraDependencies = [ pkgs.emptyFile ];
30 secretKeyPath = builtins.toString (
31 pkgs.writeText "ncps-cache-key" "ncps:dcrGsrku0KvltFhrR5lVIMqyloAdo0y8vYZOeIFUSLJS2IToL7dPHSSCk/fi+PJf8EorpBn8PU7MNhfvZoI8mA=="
36 caches = [ "http://harmonia:5000" ];
38 "cache.example.com-1:eIGQXcGQpc00x6/XFcyacLEUmC07u4RAEHt5Y8vdglo="
43 networking.firewall.allowedTCPPorts = [ 8501 ];
48 substituters = lib.mkForce [ "http://ncps:8501" ];
49 trusted-public-keys = lib.mkForce [
50 "ncps:UtiE6C+3Tx0kgpP34vjyX/BKK6QZ/D1OzDYX72aCPJg="
60 (lib.strings.removePrefix "/nix/store/" (
61 lib.strings.removeSuffix "-empty-file" pkgs.emptyFile.outPath
65 narinfoNameChars = lib.strings.stringToCharacters narinfoName;
67 narinfoPath = lib.concatStringsSep "/" [
68 nodes.ncps.services.ncps.cache.dataPath
70 (lib.lists.elemAt narinfoNameChars 0)
71 ((lib.lists.elemAt narinfoNameChars 0) + (lib.lists.elemAt narinfoNameChars 1))
78 harmonia.wait_for_unit("harmonia.service")
80 ncps.wait_for_unit("ncps.service")
82 client01.wait_until_succeeds("curl -f http://ncps:8501/ | grep '\"hostname\":\"${toString nodes.ncps.services.ncps.cache.hostName}\"' >&2")
84 client01.succeed("cat /etc/nix/nix.conf >&2")
85 client01.succeed("nix-store --realise ${pkgs.emptyFile}")
87 ncps.succeed("cat ${narinfoPath} >&2")