A flake crashes my pc

I’m creating a flake that installs Nodejs mongosh and MongoDB,
The problem is that Mongodb is unfree software and I don’t have many resources to compile it, so I used the nix-community-cachix for that and it still breaks my PC, it becomes very slow and pretty much unusable, here’s my flake:

{
  description = "Installing Nodejs with a flake";

  inputs = {
    nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
  };

 nixConfig = {
    extra-substituters = [
      "https://nix-community.cachix.org"
    ];
    extra-trusted-public-keys = [
      "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
    ];
};
  outputs = { nixpkgs-stable, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
    let
      inherit (nixpkgs-stable) lib;
      pkgs = import nixpkgs-stable {
        inherit system;
        config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
          "mongodb"
        ];
      };
    in {
      devShells.TestingNodejsFlake = pkgs.mkShell {
        buildInputs = [
          pkgs.nodejs
          pkgs.mongodb
          pkgs.mongosh
        ];
      };
    });
}

please lemme know what the issue might be

Hi,

I’m afraid we won’t be able to do much about it. Since it’s classified as unfree, it won’t be cached. You’re best chance is to build in on another machine and then copy the closure over… unless someone has a better idea.

2 Likes

Are you sure that the nix-community cache contains these paths?

Also, I don’t think flakes allow you to specify additional trusted public keys in this manner unless you’re a trusted user.

I somebody on discord gave it to me, I’m no so sure, anyways when i run this script i get prompted with a questions like, “do you trust this link …? y/n”
and then when i start installing, after a moment my pc starts crashing