perf: import treefmt-nix via flake-parts
This commit is contained in:
parent
6b5efae785
commit
a80bd4ed3b
20
flake.lock
20
flake.lock
|
@ -461,22 +461,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1735554305,
|
||||
"narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuscht-search": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
|
@ -636,7 +620,9 @@
|
|||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736154270,
|
||||
|
|
19
flake.nix
19
flake.nix
|
@ -7,6 +7,7 @@
|
|||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
impermanence.url = "github:nix-community/impermanence/master";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -24,18 +25,16 @@
|
|||
outputs = inputs@{self, flake-parts, treefmt-nix,...}:
|
||||
flake-parts.lib.mkFlake
|
||||
{ inherit inputs; } {
|
||||
perSystem = {pkgs, ...}: let
|
||||
treefmtEval = treefmt-nix.lib.evalModule pkgs {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt.enable = true;
|
||||
};
|
||||
in {
|
||||
formatter = treefmtEval.config.build.wrapper;
|
||||
checks.formatting = treefmtEval.config.build.check self;
|
||||
};
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
imports = [ ./spec ];
|
||||
|
||||
perSystem.treefmt = {
|
||||
programs.nixfmt.enable = true;
|
||||
};
|
||||
imports = [
|
||||
./spec
|
||||
treefmt-nix.flakeModule
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue