Skip to content

Instantly share code, notes, and snippets.

@rickynils
rickynils / README.md
Created June 4, 2026 16:28
ssh-ng:// excessive `QueryPathInfo` on `nix copy --from`

ssh-ng:// excessive QueryPathInfo on nix copy --from

The NixOS config in this repos is just used to produce a non-trivial derivation graph that can demonstrate the slowness introduced by the many sequential QueryPathInfo ops that nix copy --from ssh-ng://... results in.

$ nix path-info --derivation .#nixosConfigurations.test.config.system.build.toplevel
/nix/store/q4bjy0j6jfs2ydp3d8xqx5g8giv5v9mq-nixos-system-test-26.11.20260531.331800d.drv
image_x86_64 = pkgs.runCommand "${cfg.product}-image" {
buildInputs = with pkgs; [
bc
coreutils
dosfstools
e2fsprogs
fakeroot
gnutar
jq
mtools
@rickynils
rickynils / default.nix
Created November 12, 2015 13:10
nix-deployable ACI images
{ stdenv, gzip, rkt, goPackages, pythonPackages }:
stdenv.mkDerivation rec {
name = "rkt-test";
buildInputs = [ gzip rkt goPackages.acbuild ];
phases = [ "buildPhase" "installPhase" "fixupPhase" ];
buildPhase = ''
@rickynils
rickynils / libvirt.nix
Created March 22, 2014 19:36
NixOS libvirt/qemu
network:
with (import <nixpkgs> {});
with lib;
with builtins;
let
hosts = attrNames network;