fix(treefmt): respect the packages edition
Otherwise it might upgrade to edition 2024 which is not available in stable.
This commit is contained in:
parent
e1d21cf3e4
commit
fc669d5534
1 changed files with 13 additions and 10 deletions
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue