nixos-config/nixos/nix.nix
Sridhar Ratnakumar 0a0debe670 Use newer nix
2023-05-15 12:26:41 -04:00

29 lines
922 B
Nix

{ flake, pkgs, lib, ... }:
{
nixpkgs = {
config = {
allowBroken = true;
allowUnsupportedSystem = true;
allowUnfree = true;
};
overlays = [
flake.inputs.nuenv.overlays.nuenv
(self: super: { devour-flake = self.callPackage flake.inputs.devour-flake { }; })
];
};
nix = {
package = pkgs.nixUnstable; # Need 2.15 for bug fixes
nixPath = [ "nixpkgs=${flake.inputs.nixpkgs}" ]; # Enables use of `nix-shell -p ...` etc
registry.nixpkgs.flake = flake.inputs.nixpkgs; # Make `nix shell` etc use pinned nixpkgs
settings = {
experimental-features = "nix-command flakes repl-flake";
# I don't have an Intel mac.
extra-platforms = lib.mkIf pkgs.stdenv.isDarwin "aarch64-darwin x86_64-darwin";
# Nullify the registry for purity.
flake-registry = builtins.toFile "empty-flake-registry.json" ''{"flakes":[],"version":2}'';
};
};
}