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:
parent
5fefcb1c28
commit
07cba07ea2
@ -8,41 +8,41 @@
|
|||||||
inherit
|
inherit
|
||||||
(pkgs)
|
(pkgs)
|
||||||
agenix
|
agenix
|
||||||
|
alejandra
|
||||||
cachix
|
cachix
|
||||||
editorconfig-checker
|
editorconfig-checker
|
||||||
mdbook
|
|
||||||
nixUnstable
|
nixUnstable
|
||||||
|
nodePackages
|
||||||
|
shfmt
|
||||||
treefmt
|
treefmt
|
||||||
nvfetcher-bin
|
nvfetcher-bin
|
||||||
;
|
;
|
||||||
|
|
||||||
hooks = import ./hooks;
|
|
||||||
|
|
||||||
pkgWithCategory = category: package: {inherit package category;};
|
pkgWithCategory = category: package: {inherit package category;};
|
||||||
devos = pkgWithCategory "devos";
|
devos = pkgWithCategory "devos";
|
||||||
linter = pkgWithCategory "linter";
|
formatter = pkgWithCategory "linter";
|
||||||
docs = pkgWithCategory "docs";
|
|
||||||
in {
|
in {
|
||||||
_file = toString ./.;
|
imports = ["${extraModulesPath}/git/hooks.nix" ./hooks];
|
||||||
|
|
||||||
imports = ["${extraModulesPath}/git/hooks.nix"];
|
packages = [
|
||||||
git = {inherit hooks;};
|
alejandra
|
||||||
|
nodePackages.prettier
|
||||||
|
shfmt
|
||||||
|
editorconfig-checker
|
||||||
|
];
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
[
|
[
|
||||||
(devos nixUnstable)
|
(devos nixUnstable)
|
||||||
(devos agenix)
|
(devos agenix)
|
||||||
|
|
||||||
{
|
{
|
||||||
category = "devos";
|
category = "devos";
|
||||||
name = nvfetcher-bin.pname;
|
name = nvfetcher-bin.pname;
|
||||||
help = nvfetcher-bin.meta.description;
|
help = nvfetcher-bin.meta.description;
|
||||||
command = "cd $PRJ_ROOT/pkgs; ${nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
|
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) [
|
++ lib.optionals (!pkgs.stdenv.buildPlatform.isi686) [
|
||||||
(devos cachix)
|
(devos cachix)
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
enable = true;
|
git.hooks = {
|
||||||
pre-commit.text = builtins.readFile ./pre-commit.sh;
|
enable = true;
|
||||||
|
pre-commit.text = builtins.readFile ./pre-commit.sh;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user