webnsupdate/flake-modules/default.nix
Jalil David Salamé Messina fc669d5534
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
fix(treefmt): respect the packages edition
Otherwise it might upgrade to edition 2024 which is not available in
stable.
2025-04-29 08:11:53 +02:00

44 lines
864 B
Nix

{ lib, inputs, ... }:
let
webnsupdate = ../module.nix;
cargoToml = lib.importTOML ../Cargo.toml;
in
{
imports = [
inputs.treefmt-nix.flakeModule
./package.nix
./tests.nix
];
flake.nixosModules = {
default = webnsupdate;
inherit webnsupdate;
};
perSystem =
{ pkgs, ... }:
{
# Setup formatters
treefmt = {
projectRootFile = "flake.nix";
programs = {
nixfmt.enable = true;
rustfmt = {
enable = true;
inherit (cargoToml.package) edition; # respect the package's edition
};
statix.enable = true;
typos.enable = true;
};
};
devShells.default = pkgs.mkShellNoCC {
packages = with pkgs; [
cargo-insta
cargo-udeps
mold
git-cliff
];
};
};
}