From ec78d2e1ab17bb9c52158af3534f6ad494548fb5 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Tue, 4 Jun 2024 17:35:37 +0100 Subject: [PATCH] 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"`; --- flake-modules/default.nix | 1 - flake-modules/dev/default.nix | 2 +- flake.lock | 16 ---------------- flake.nix | 2 -- 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/flake-modules/default.nix b/flake-modules/default.nix index 3938193d..788aec62 100644 --- a/flake-modules/default.nix +++ b/flake-modules/default.nix @@ -11,7 +11,6 @@ ./templates.nix ./tests.nix ./wrappers.nix - inputs.flake-root.flakeModule ]; perSystem = diff --git a/flake-modules/dev/default.nix b/flake-modules/dev/default.nix index 3cae4200..8cabe1b2 100644 --- a/flake-modules/dev/default.nix +++ b/flake-modules/dev/default.nix @@ -12,7 +12,7 @@ formatter = config.treefmt.build.wrapper; treefmt.config = { - inherit (config.flake-root) projectRootFile; + projectRootFile = "flake.nix"; package = pkgs.treefmt; programs = { diff --git a/flake.lock b/flake.lock index 08855e74..55878834 100644 --- a/flake.lock +++ b/flake.lock @@ -71,21 +71,6 @@ "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": { "inputs": { "systems": "systems" @@ -211,7 +196,6 @@ "devshell": "devshell", "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "flake-root": "flake-root", "git-hooks": "git-hooks", "home-manager": "home-manager", "nix-darwin": "nix-darwin", diff --git a/flake.nix b/flake.nix index 10431a97..9076e6fd 100644 --- a/flake.nix +++ b/flake.nix @@ -16,8 +16,6 @@ url = "github:hercules-ci/flake-parts"; inputs.nixpkgs-lib.follows = "nixpkgs"; }; - # A flake-parts module for finding the project root directory - flake-root.url = "github:srid/flake-root"; devshell = { url = "github:numtide/devshell"; inputs.nixpkgs.follows = "nixpkgs";