nix-config/hosts/nncp/neighbours.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
628 B
Nix
Raw Normal View History

2022-12-04 08:53:28 +01:00
{ config, pkgs, ... }:
2022-02-07 13:06:10 +01:00
2022-12-04 08:53:28 +01:00
{
programs.nncp.settings.neigh.emery.exec = {
2022-02-07 13:06:10 +01:00
# A command to asynchronously export store paths to a remote caller.
nix-store-export = with pkgs;
[
(writeScript "nncp-nix-store-export.sh" ''
#!${bash}/bin/bash
set -euo pipefail
${config.nix.package}/bin/nix-store --export $@ | \
${config.programs.nncp.package}/bin/nncp-exec -nice $NNCP_NICE $NNCP_SENDER nix-store-import
'')
];
# A command to import store paths from a remote caller.
nix-store-import = [ "${config.nix.package}/bin/nix-store" "--import" ];
};
2022-12-04 08:53:28 +01:00
}