2023-10-26 02:37:42 +00:00
|
|
|
{ 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 = {
|
|
|
|
package = pkgs.nixUnstable;
|
|
|
|
nixPath = {
|
|
|
|
nixpkgs = "${flake.inputs.nixpkgs}";
|
2023-11-03 04:12:17 +00:00
|
|
|
} // lib.optionalAttrs pkgs.stdenv.isDarwin {
|
|
|
|
darwin = "${flake.inputs.nix-darwin}";
|
2023-10-26 02:37:42 +00:00
|
|
|
};
|
|
|
|
registry = {
|
|
|
|
nixpkgs.flake = flake.inputs.nixpkgs;
|
2023-11-03 04:12:17 +00:00
|
|
|
self.flake = flake.inputs.self;
|
2023-10-26 02:37:42 +00:00
|
|
|
};
|
|
|
|
settings = {
|
2023-11-03 04:12:17 +00:00
|
|
|
# TODO: automatic optimizing and gc
|
2023-10-26 02:37:42 +00:00
|
|
|
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}'';
|
2023-11-03 04:12:17 +00:00
|
|
|
trusted-users = [ flake.config.users.me "root" "@admin" "@wheel" ];
|
2023-10-26 02:37:42 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|