refactor(flake): wrap xonsh as a package

This commit is contained in:
Artur Manuel 2025-01-18 12:34:41 +00:00
commit d84ed13e0f
11 changed files with 287 additions and 135 deletions

49
shells/default.nix Normal file
View file

@ -0,0 +1,49 @@
{inputs, ...}: {
imports = [
inputs.git-hooks-nix.flakeModule
];
perSystem = {
config,
pkgs,
...
}: {
pre-commit = {
check.enable = true;
settings.hooks = {
alejandra.enable = true;
nil.enable = true;
shellcheck.enable = true;
prettier.enable = true;
ruff.enable = true;
ruff-format.enable = true;
shfmt.enable = true;
deadnix = {
enable = true;
args = ["-e"];
};
statix = {
enable = true;
args = ["fix"];
};
};
};
devShells = {
default = config.pre-commit.devShell;
haskell = pkgs.mkShell {
name = "haskell";
packages = builtins.attrValues {
inherit (pkgs) ghc;
inherit
(pkgs.haskellPackages)
stack
haskell-language-server
ormolu
;
};
};
};
formatter = pkgs.alejandra;
};
}