Skip to content

Commit

Permalink
feat: drop treefmt
Browse files Browse the repository at this point in the history
  • Loading branch information
anntnzrb committed Dec 19, 2024
1 parent ff5a0b3 commit ecfabc8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 56 deletions.
37 changes: 1 addition & 36 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
cargo-doc-live.url = "github:srid/cargo-doc-live";

# Dev tools
treefmt-nix.url = "github:numtide/treefmt-nix";

git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.flake = false;
};
Expand Down
6 changes: 1 addition & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ default:

# Auto-format the source tree
fmt:
treefmt

# Runs pre-commit
pre-commit:
pre-commit run -a
pre-commit run --all-files

# Run 'cargo run' on the project
run *ARGS:
Expand Down
1 change: 0 additions & 1 deletion nix/modules/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
name = "rust-nix-template-shell";
inputsFrom = [
self'.devShells.rust
config.treefmt.build.devShell
config.pre-commit.devShell # See ./nix/modules/formatter.nix
];
packages = with pkgs; [
Expand Down
11 changes: 0 additions & 11 deletions nix/modules/formatting.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{
imports = [
(inputs.git-hooks + /flake-module.nix)
inputs.treefmt-nix.flakeModule
];
perSystem = { config, self', pkgs, lib, ... }: {
pre-commit.settings = {
Expand All @@ -12,15 +11,5 @@
cargo-check.enable = true;
};
};

# Add your auto-formatters here.
# cf. https://nixos.asia/en/treefmt
treefmt.config = {
projectRootFile = "flake.nix";
programs = {
nixpkgs-fmt.enable = true;
rustfmt.enable = true;
};
};
};
}

0 comments on commit ecfabc8

Please sign in to comment.