Format, and keep formatted
This commit is contained in:
parent
7a187fda7a
commit
cfda626614
7 changed files with 94 additions and 41 deletions
26
flake.nix
26
flake.nix
|
|
@ -8,14 +8,15 @@
|
|||
nix-cargo-integration.url = "github:yusdacra/nix-cargo-integration";
|
||||
nix-cargo-integration.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{ self, flake-parts, ... }:
|
||||
inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } (
|
||||
toplevel@{
|
||||
lib,
|
||||
withSystem,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -24,9 +25,7 @@
|
|||
*/
|
||||
flake-parts-modules.basic =
|
||||
{
|
||||
config,
|
||||
flake-parts-lib,
|
||||
withSystem,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
|
@ -114,7 +113,7 @@
|
|||
*/
|
||||
flake-parts-modules.tested =
|
||||
# Consumer toplevel
|
||||
{ options, config, ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
_file = ./flake.nix;
|
||||
imports = [ flake-parts-modules.basic ];
|
||||
|
|
@ -165,6 +164,7 @@
|
|||
inputs.nix-cargo-integration.flakeModule
|
||||
inputs.flake-parts.flakeModules.partitions
|
||||
inputs.flake-parts.flakeModules.modules
|
||||
inputs.treefmt-nix.flakeModule
|
||||
# dogfood
|
||||
flake-parts-modules.tested
|
||||
./nci.nix
|
||||
|
|
@ -177,14 +177,24 @@
|
|||
];
|
||||
perSystem =
|
||||
{
|
||||
config,
|
||||
self',
|
||||
inputs',
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
packages.nix = inputs'.nix.packages.nix;
|
||||
|
||||
treefmt = {
|
||||
# Used to find the project root
|
||||
projectRootFile = "flake.lock";
|
||||
|
||||
programs.rustfmt = {
|
||||
enable = true;
|
||||
edition = "2021";
|
||||
};
|
||||
programs.nixfmt.enable = true;
|
||||
programs.deadnix.enable = true;
|
||||
#programs.clang-format.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
partitionedAttrs.devShells = "dev";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue