1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-22 23:51:39 +03:00

💡 refactor Rework devos devshell

This commit is contained in:
Lord-Valen 2022-12-23 03:33:44 -05:00 committed by David Arnold
parent 5fefcb1c28
commit 07cba07ea2
2 changed files with 16 additions and 14 deletions

View File

@ -8,41 +8,41 @@
inherit
(pkgs)
agenix
alejandra
cachix
editorconfig-checker
mdbook
nixUnstable
nodePackages
shfmt
treefmt
nvfetcher-bin
;
hooks = import ./hooks;
pkgWithCategory = category: package: {inherit package category;};
devos = pkgWithCategory "devos";
linter = pkgWithCategory "linter";
docs = pkgWithCategory "docs";
formatter = pkgWithCategory "linter";
in {
_file = toString ./.;
imports = ["${extraModulesPath}/git/hooks.nix" ./hooks];
imports = ["${extraModulesPath}/git/hooks.nix"];
git = {inherit hooks;};
packages = [
alejandra
nodePackages.prettier
shfmt
editorconfig-checker
];
commands =
[
(devos nixUnstable)
(devos agenix)
{
category = "devos";
name = nvfetcher-bin.pname;
help = nvfetcher-bin.meta.description;
command = "cd $PRJ_ROOT/pkgs; ${nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
}
(linter treefmt)
(linter editorconfig-checker)
(docs mdbook)
(formatter treefmt)
]
++ lib.optionals (!pkgs.stdenv.buildPlatform.isi686) [
(devos cachix)

View File

@ -1,4 +1,6 @@
{
enable = true;
pre-commit.text = builtins.readFile ./pre-commit.sh;
git.hooks = {
enable = true;
pre-commit.text = builtins.readFile ./pre-commit.sh;
};
}