{ perSystem = { pkgs, config, inputs', ... }: let stylix-check = pkgs.writeShellApplication { name = "stylix-check"; runtimeInputs = with pkgs; [ nix nix-fast-build ]; text = '' cores="$(nproc)" system="$(nix eval --expr builtins.currentSystem --impure --raw)" nix-fast-build \ --eval-max-memory-size 512 \ --eval-workers "$cores" \ --flake ".#checks.$system" \ --no-link \ --skip-cached \ "$@" ''; }; in { devShells = { default = pkgs.mkShell { # Install git-hooks when activating the shell shellHook = config.pre-commit.installationScript; packages = [ stylix-check inputs'.home-manager.packages.default config.formatter ] ++ config.pre-commit.settings.enabledPackages ++ config.formatter.runtimeInputs; }; ghc = pkgs.mkShell { inputsFrom = [ config.devShells.default ]; packages = [ pkgs.ghc ]; }; }; }; }