diff --git a/examples/devos/shell/devos.nix b/examples/devos/shell/devos.nix index 39fd5ed..02c2a3c 100644 --- a/examples/devos/shell/devos.nix +++ b/examples/devos/shell/devos.nix @@ -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) diff --git a/examples/devos/shell/hooks/default.nix b/examples/devos/shell/hooks/default.nix index 10f2c9d..1d60d49 100644 --- a/examples/devos/shell/hooks/default.nix +++ b/examples/devos/shell/hooks/default.nix @@ -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; + }; }