with import <nixpkgs> {}; with lib; buildEnv { name = "zed.d"; pathsToLink = [ "/etc/zfs/zed.d" ]; ignoreCollisions = true; paths = [ (writeTextFile rec { name = "zed.rc"; destination = "/etc/zfs/zed.d/${name}"; text = "foo"; }) zfs ]; }