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
668 B
Nix
Raw Normal View History

2022-02-07 13:06:10 +01:00
{ config, lib, pkgs, ... }:
let
exec = {
# 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" ];
};
in { programs.nncp.settings.neigh = { emery = { inherit exec; }; }; }