mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-20 08:34:28 +01:00
40 lines
1.3 KiB
Nix
40 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
nixpkgs,
|
|
...
|
|
}: {
|
|
###################################################################################
|
|
#
|
|
# Core configuration for nix-darwin
|
|
#
|
|
# All the configuration options are documented here:
|
|
# https://daiderd.com/nix-darwin/manual/index.html#sec-options
|
|
#
|
|
# History Issues:
|
|
# 1. Fixed by replace the determined nix-installer by the official one:
|
|
# https://github.com/LnL7/nix-darwin/issues/149#issuecomment-1741720259
|
|
#
|
|
###################################################################################
|
|
|
|
# Allow unfree packages
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
# Auto upgrade the nix-daemon service.
|
|
services.nix-daemon.enable = true;
|
|
|
|
# Disable auto-optimise-store because of this issue:
|
|
# https://github.com/NixOS/nix/issues/7273
|
|
# "error: cannot link '/nix/store/.tmp-link-xxxxx-xxxxx' to '/nix/store/.links/xxxx': File exists"
|
|
nix.settings.auto-optimise-store = false;
|
|
|
|
nix.gc.automatic = false;
|
|
|
|
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
|
|
nix.registry.nixpkgs.flake = nixpkgs;
|
|
|
|
environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
|
|
# make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
|
|
# discard all the default paths, and only use the one from this flake.
|
|
nix.nixPath = lib.mkForce ["/etc/nix/inputs"];
|
|
}
|