/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

{ lib, ... }:
{
  nix = {
    generateRegistryFromInputs = lib.mkDefault true;
    settings = {
      substituters = [
        "https://nix-community.cachix.org"
        "https://cache.nixos.org/"
      ];
      trusted-public-keys = [
        "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
      ];
    };
  };

  environment.variables.LD_LIBRARY_PATH = lib.mkForce [
      "/run/current-system/sw/lib"
  ];
  system.stateVersion = "22.11";
}
