{ fetchgit , lib , findutils , coreutils }: let dotfiles = fetchgit (rec { name = "dotfiles-${rev}"; url = git://git.yggdrasil.li/dotfiles; rev = "4f5b56901294354152d90b52721e8b165a40d307"; sha256 = "62a16cb79b0491b49fcfb3c03904cf8f83bf03aeeb1bff285a66bb15efd3a4e1"; }); setupUser = name : { name = name.dir; value = '' cd ${dotfiles} ${findutils}/bin/find . -type d -print0 | ${findutils}/bin/xargs -0 -I '{}' -- ${coreutils}/install -o ${name.owner} -g ${name.group} -d "${name.dir}/{}" ${findutils}/bin/find . -type f -print0 | ${findutils}/bin/xargs -0 -I '{}' -- ln -s -f "${dotfiles}/{}" "${name.dir}/{}" ${findutils}/bin/find . -type f -print0 | ${findutils}/bin/xargs -0 -I '{}' -- chown -h "${name.owner}:${name.group}" "${name.dir}/{}" ''; }; in names : lib.listToAttrs (builtins.map setupUser names)