How to develop PAM modules in NixOS?

I love how with NixOS I can use flake.nix and nix develop to create development environments for different things. I don’t have to use a VM or distrobox or modify the OS that I use. However, I want to test a custom PAM module, such as GitHub - ChocolateLoverRaj/pam-random: A PAM module that has a 1/2 chance of succeeding. Useful for testing PAM related stuff.. However, testing it requires adding a file to in /etc/pam.d and adding a file to /lib64/security. How do I add these files to a devShell? This is how I would do it in a VM / other machine accessed through SSH:


cargo build
scp ./pam-random root@$IP:/etc/pam.d
scp ./target/debug/ root@$IP:/lib64/security
pamtester pam-random <user> authenticate

this is the flake.nix that I’m using to build the file ./target/debug/

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
    rust-overlay.url = "github:oxalica/rust-overlay";

  outputs =
    { self
    , nixpkgs
    , rust-overlay
    , flake-utils
        pkgs = import nixpkgs {
          system = "x86_64-linux";
          overlays = [
            (import rust-overlay)
      with pkgs;
        devShells.default = mkShell {
          buildInputs = [
            (rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)

how can I create something similar which includes the custom file in /etc and /lib64?