fix(treefmt): respect the packages edition
All checks were successful
/ check-renovaterc (push) Successful in 3s
/ build (push) Successful in 1s
/ test (push) Successful in 12s
/ report-size (push) Successful in 2s

Otherwise it might upgrade to edition 2024 which is not available in
stable.
This commit is contained in:
Jalil David Salamé Messina 2025-04-29 08:08:00 +02:00
parent e1d21cf3e4
commit fc669d5534
Signed by: jalil
GPG key ID: F016B9E770737A0B

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,14 +10,10 @@
./tests.nix ./tests.nix
]; ];
flake.nixosModules = flake.nixosModules = {
let default = webnsupdate;
webnsupdate = ../module.nix; inherit webnsupdate;
in };
{
default = webnsupdate;
inherit webnsupdate;
};
perSystem = perSystem =
{ pkgs, ... }: { pkgs, ... }:
@ -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;
}; };