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

View file

@ -55,13 +55,22 @@
ref = "master";
inputs.nixpkgs.follows = "nixpkgs";
};
hetch = {
type = "git";
url = "https://codeberg.org/amadaluzia/hetch.git";
ref = "master";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
};
outputs = inputs @ {
self,
nixpkgs,
flake-parts,
...
}: let
lib = nixpkgs.lib.extend (import ./lib {inherit inputs;});
lib = nixpkgs.lib.extend (import ./lib {inherit inputs self;});
in
flake-parts.lib.mkFlake {
inherit inputs;
@ -71,48 +80,8 @@
imports = [
./hosts
./overlays
inputs.git-hooks-nix.flakeModule
./shells
];
flake = {inherit lib;};
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;
devShells.haskell = pkgs.mkShell {
name = "haskell";
packages = builtins.attrValues {
inherit (pkgs) ghc;
inherit
(pkgs.haskellPackages)
cabal-install
haskell-language-server
ormolu
;
};
};
formatter = pkgs.alejandra;
};
};
}