dotfiles/flake.nix
2023-07-20 22:04:50 -04:00

41 lines
1 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
systems.url = "github:nix-systems/default";
devenv.url = "github:cachix/devenv";
};
outputs = {
self,
nixpkgs,
devenv,
systems,
...
} @ inputs: let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in {
devShells =
forEachSystem
(system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [
{
# https://devenv.sh/reference/options/
packages = [pkgs.hello pkgs.delta pkgs.difftastic pkgs.alejandra pkgs.nodePackages.bash-language-server pkgs.shellcheck pkgs.shfmt];
pre-commit.hooks = {
alejandra.enable = true;
black.enable = true;
shellcheck.enable = true;
shfmt.enable = true;
taplo.enable = true;
};
}
];
};
});
};
}