{ fetchgit , lib , findutils , coreutils }: let dotfiles = fetchgit (rec { name = "dotfiles-${rev}"; url = git://git.yggdrasil.li/dotfiles; rev = "6d113b9213d8b3ddc694116b63c579b12eea911a"; sha256 = "f1679ba789c968a469f3cd7275adaf0f714329a193e8b5a695fd172f5aa38687"; }); setupUser = name : { name = name.dir; value = '' cd ${dotfiles} ${findutils}/bin/find . -type d -print0 | ${findutils}/bin/xargs -0 -I '{}' -- ${coreutils}/bin/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)