{ description = "Cynerd's shell configuration"; outputs = { self, flake-utils, nixpkgs }: let loadrc = dir: '' for sh in ${dir}/*; do [ -r "$sh" ] && . "$sh" done ''; commonrc = loadrc ./shellrc.d; desktoprc = loadrc ./shellrc-desktop.d; bashrc = loadrc ./bashrc.d; zshrc = loadrc ./zshrc.d; packages = pkgs: rec { shellrc-generic = pkgs.stdenvNoCC.mkDerivation { name = "shellrc-profile"; src = ./.; installPhase = '' mkdir -p "$out/etc/shellrc" cp -r ./shellrc.d/. "$out/etc/shellrc/" ''; }; shellrc-bashrc = pkgs.stdenvNoCC.mkDerivation { name = "shellrc-profile-bash"; src = ./.; shellrc = shellrc-generic; installPhase = '' mkdir -p "$out/etc/bashrc.d" cp -r ./bashrc.d/. "$out/etc/bashrc.d/" cat >"$out/etc/bashrc.d/shellrc" <"$out/etc/zshrc.d/shellrc" <