diff --git a/flake-modules/default.nix b/flake-modules/default.nix index 6736a16..7cf532e 100644 --- a/flake-modules/default.nix +++ b/flake-modules/default.nix @@ -1,4 +1,8 @@ -{ inputs, ... }: +{ lib, inputs, ... }: +let + webnsupdate = ../module.nix; + cargoToml = lib.importTOML ../Cargo.toml; +in { imports = [ inputs.treefmt-nix.flakeModule @@ -6,14 +10,10 @@ ./tests.nix ]; - flake.nixosModules = - let - webnsupdate = ../module.nix; - in - { - default = webnsupdate; - inherit webnsupdate; - }; + flake.nixosModules = { + default = webnsupdate; + inherit webnsupdate; + }; perSystem = { pkgs, ... }: @@ -23,7 +23,10 @@ projectRootFile = "flake.nix"; programs = { nixfmt.enable = true; - rustfmt.enable = true; + rustfmt = { + enable = true; + inherit (cargoToml.package) edition; # respect the package's edition + }; statix.enable = true; typos.enable = true; }; diff --git a/flake.lock b/flake.lock index a5a9d6c..2b6d1fa 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1745526057, - "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", + "lastModified": 1745794561, + "narHash": "sha256-T36rUZHUART00h3dW4sV5tv4MrXKT7aWjNfHiZz7OHg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f771eb401a46846c1aebd20552521b233dd7e18b", + "rev": "5461b7fa65f3ca74cef60be837fd559a8918eaa0", "type": "github" }, "original": {