53 lines
1.3 KiB
Nix
53 lines
1.3 KiB
Nix
{
|
|
flake,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
nixpkgs = {
|
|
config = {
|
|
allowBroken = true;
|
|
allowUnfree = true;
|
|
allowUnsupportedSystem = true;
|
|
};
|
|
overlays = [
|
|
flake.inputs.helix.overlays.default
|
|
flake.inputs.nixd.overlays.default
|
|
flake.inputs.nil.overlays.nil
|
|
(import ../pkgs flake.inputs)
|
|
];
|
|
};
|
|
|
|
nix = {
|
|
nixPath = {
|
|
nixpkgs = "${flake.inputs.nixpkgs}";
|
|
} // lib.optionalAttrs pkgs.stdenv.isDarwin { darwin = "${flake.inputs.nix-darwin}"; };
|
|
registry = {
|
|
nixpkgs.flake = flake.inputs.nixpkgs;
|
|
self.flake = flake.inputs.self;
|
|
};
|
|
settings = {
|
|
# TODO: automatic optimizing and gc
|
|
# https://github.com/montchr/dotfield/blob/main/profiles/darwinProfiles/core/nix-optimizations-darwin.nix
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
"repl-flake"
|
|
];
|
|
extra-platforms = lib.mkIf (pkgs.system == "aarch64-darwin") [
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
# wipe out the registry for purity, cf. https://github.com/MatthewCroughan/nixcfg/commit/ce86bee2755127a4fdaca91e5e037d3fe625cba9
|
|
flake-registry = builtins.toFile "empty-flake-registry.json" ''{"flakes":[],"version":2}'';
|
|
trusted-users = [
|
|
flake.config.users.me
|
|
"root"
|
|
"@admin"
|
|
"@wheel"
|
|
];
|
|
};
|
|
};
|
|
}
|