fix(treefmt): respect the packages edition #207

Merged
jalil merged 1 commit from pin-rustfmt-edition into main 2025-04-29 08:12:33 +02:00

View file

@ -1,4 +1,8 @@
{ inputs, ... }: { lib, inputs, ... }:
let
webnsupdate = ../module.nix;
cargoToml = lib.importTOML ../Cargo.toml;
in
{ {
imports = [ imports = [
inputs.treefmt-nix.flakeModule inputs.treefmt-nix.flakeModule
@ -6,11 +10,7 @@
./tests.nix ./tests.nix
]; ];
flake.nixosModules = flake.nixosModules = {
let
webnsupdate = ../module.nix;
in
{
default = webnsupdate; default = webnsupdate;
inherit webnsupdate; inherit webnsupdate;
}; };
@ -23,7 +23,10 @@
projectRootFile = "flake.nix"; projectRootFile = "flake.nix";
programs = { programs = {
nixfmt.enable = true; nixfmt.enable = true;
rustfmt.enable = true; rustfmt = {
enable = true;
inherit (cargoToml.package) edition; # respect the package's edition
};
statix.enable = true; statix.enable = true;
typos.enable = true; typos.enable = true;
}; };