Rust embedded nix raspi pico

Hi!
I’m trying to build a really straightforward embedded rust project for a raspberry pico. I tried cargo2nix and buildRustPackages but without success…

Here’s the src/main.rs

#![no_std]
#![no_main]
use rp_pico::entry;
use panic_halt as _;
#[entry]
fn see_doesnt_have_to_be_called_main() -> ! {
  loop {}
}

Cargo.toml

[package]
name = "foo"
version = "0.1.0"
edition = "2021"
description = "Boilerplate for the Nucleo-WL55JC2 development board."

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cortex-m-rt = "0.7.3"
panic-halt = "0.2.0"
rp-pico = "0.7.0"

and the .cargo/config.toml

[target.'cfg(all(target_arch = "arm", target_os = "none"))']
runner = "elf2uf2-rs -d"
[build]
target = "thumbv6m-none-eabi"

rustflags = ["-C", "link-arg=-Tlink.x"]⏎

This is the flake.nix which use cargo2nix

{
  inputs = {
    cargo2nix.url = "github:cargo2nix/cargo2nix/release-0.11.0";
    rust-overlay.url = "github:oxalica/rust-overlay";
    flake-utils.follows = "cargo2nix/flake-utils";
    nixpkgs.follows = "cargo2nix/nixpkgs";
  };

  outputs = inputs: with inputs;
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
          inherit system;
          overlays = [(import rust-overlay) cargo2nix.overlays.default];
        };

        rustWithCortexTarget = pkgs.rust-bin.beta.latest.minimal.override {
          targets = [ "thumbv6m-none-eabi" ];
          extensions = [ "rust-src" ];
        };

        rustPkgs = pkgs.rustBuilder.makePackageSet {
          rustChannel = "nightly";
          rustVersion = "1.69.0";
          rustToolchain = rustWithCortexTarget;
          target = "thumbv6m-none-eabi";
          packageFun = import ./Cargo.nix;
        };

      in rec {
        packages = {
          # replace hello-world with your package name
          foo = (rustPkgs.workspace.foo {}).bin;
          default = packages.foo;
        };
      }
    );
}

How can i specify the target ?