mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-11 09:17:54 +08:00
33 lines
1.1 KiB
Nix
33 lines
1.1 KiB
Nix
{ flake, pkgs, lib, ... }:
|
|
|
|
{
|
|
nixpkgs = {
|
|
config = {
|
|
allowBroken = true;
|
|
allowUnsupportedSystem = true;
|
|
allowUnfree = true;
|
|
};
|
|
overlays = [
|
|
flake.inputs.nuenv.overlays.nuenv
|
|
flake.inputs.nixd.overlays.default
|
|
flake.inputs.nuenv.overlays.default
|
|
(import ../packages/overlay.nix { inherit flake; inherit (pkgs) system; })
|
|
];
|
|
};
|
|
|
|
nix = {
|
|
package = pkgs.nixUnstable;
|
|
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 = {
|
|
max-jobs = "auto";
|
|
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}'';
|
|
trusted-users = [ "root" (if pkgs.stdenv.isDarwin then flake.config.people.myself else "@wheel") ];
|
|
};
|
|
};
|
|
}
|
|
|