Skip to content

Commit 6cfda13

Browse files
authored
dev: treefmt: specify projectRoot from flake input (#233)
* dev: treefmt: specify projectRoot from flake input ../. cannot be accessed in impure mode. * nixci config
1 parent eba0200 commit 6cfda13

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dev/flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
flake-root.url = "github:srid/flake-root";
66
mission-control.url = "github:Platonic-Systems/mission-control";
77
treefmt-nix.url = "github:numtide/treefmt-nix";
8+
haskell-flake = {};
89
};
910
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
1011
flake-parts.lib.mkFlake { inherit inputs; } {
@@ -16,7 +17,7 @@
1617
];
1718
perSystem = { pkgs, lib, config, ... }: {
1819
treefmt.config = {
19-
projectRoot = ../.;
20+
projectRoot = inputs.haskell-flake;
2021
projectRootFile = "README.md";
2122
programs.nixpkgs-fmt.enable = true;
2223

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# https://github.com/srid/nixci
1616
nixci.default = let overrideInputs = { "haskell-flake" = ./.; }; in {
17-
dev.dir = "dev";
17+
dev = { inherit overrideInputs; dir = "dev"; };
1818
doc.dir = "doc";
1919
example = { inherit overrideInputs; dir = "example"; };
2020
};

0 commit comments

Comments
 (0)