about summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/flake/devshell.nix21
1 files changed, 12 insertions, 9 deletions
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;