From 460ef092049ac15d824df2f0f203de146816fce0 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 13 Sep 2024 08:59:08 -0700 Subject: minior changes to devshell configuration --- nix/flake/devshell.nix | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'nix') diff --git a/nix/flake/devshell.nix b/nix/flake/devshell.nix index 6a3d678..2e64d36 100644 --- a/nix/flake/devshell.nix +++ b/nix/flake/devshell.nix @@ -12,36 +12,39 @@ }: { devshells.default = { name = "world"; - + devshell.startup.pre-commit.text = config.pre-commit.installationScript; packages = with pkgs; [ (config.treefmt.build.wrapper) python3 just ]; + env = [ + { + name = "DEVSHELL_NO_MOTD"; + value = "1"; + } + ]; }; treefmt = { projectRootFile = ".git/config"; + flakeFormatter = true; + flakeCheck = true; + # list of supported programs # https://github.com/numtide/treefmt-nix programs = { - gofmt.enable = true; - gofumpt.enable = true; nixpkgs-fmt.enable = true; - # shellcheck.enable = true; shfmt.enable = true; taplo.enable = true; ruff.enable = true; - # I don't understand why this is causing issues in CI. When - # I run `nix flake check` locally I don't get any issues but - # CI is failing with errors in some of the workflows. - # Commenting this until I have a proper solution - # yamlfmt.enable = true; + yamlfmt.enable = true; }; }; pre-commit = { + check.enable = true; settings = { hooks = { deadnix.enable = true; -- cgit 1.4.1