flake-modules: drop flake-root

treefmt isn't actually using flake-root to find the flake's root; it
does it itself.

All we were doing was passing flake-root's default `projectRootFile` to
treefmt, which is `"flake.nix"`;
This commit is contained in:
Matt Sturgeon 2024-06-04 17:35:37 +01:00
parent 77d4e909f8
commit ec78d2e1ab
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
4 changed files with 1 additions and 20 deletions

View file

@ -11,7 +11,6 @@
./templates.nix ./templates.nix
./tests.nix ./tests.nix
./wrappers.nix ./wrappers.nix
inputs.flake-root.flakeModule
]; ];
perSystem = perSystem =

View file

@ -12,7 +12,7 @@
formatter = config.treefmt.build.wrapper; formatter = config.treefmt.build.wrapper;
treefmt.config = { treefmt.config = {
inherit (config.flake-root) projectRootFile; projectRootFile = "flake.nix";
package = pkgs.treefmt; package = pkgs.treefmt;
programs = { programs = {

16
flake.lock generated
View file

@ -71,21 +71,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-root": {
"locked": {
"lastModified": 1713493429,
"narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=",
"owner": "srid",
"repo": "flake-root",
"rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "flake-root",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -211,7 +196,6 @@
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-root": "flake-root",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",

View file

@ -16,8 +16,6 @@
url = "github:hercules-ci/flake-parts"; url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs"; inputs.nixpkgs-lib.follows = "nixpkgs";
}; };
# A flake-parts module for finding the project root directory
flake-root.url = "github:srid/flake-root";
devshell = { devshell = {
url = "github:numtide/devshell"; url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";