Stop using `nice` related options like NixOS, and because `launchd`
recommends using `ProcessType` instead. Note this commit also changes
the default `ProcessType` for the `nix-daemon` from `Interactive` to
`Standard`.
Also remove `nix.version` option since it's no longer being used
anywhere, old irrelevant `nix-info` module, and all support for
legacy `nix.profile` option.
This is useful for flake users as they will usually already have an
instantiated Nixpkgs e.g.
let
pkgs = import nixpkgs {
config.allowUnfree = true;
overlays = [ ... ];
}
in darwin.lib.darwinSystem {
inherit pkgs;
}
This change makes `nix-darwin` match the behaviour of NixOS and
`home-manager`.
The nix.useDaemon option enables using a multi-user install without
managing the nix installation with nix-darwin. The following checks
apply to both cases.
Since named entries can be overridden now based on ordering now merging
is only a problem for removing one of the default search paths, in which
case a higher priority eg. mkForce can be used.
{
nix.nixPath = [{ darwin-config = "/darwin.nix"; }];
}
Will result in
[ "darwin-config=/darwin.nix" "/nix/var/nix/profiles/per-user/root/channels" "$HOME/.nix-defexpr/channels" ]
Fixes#137
This gives the option nicer merge behaviour, otherwise setting a named
entry multiple times would result in duplicates which can't be resolved
without overriding the entire list.
This avoids warnings like this if the root or user channel profiles
don't exist.
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
This simplifies using a non default configuration.nix without requiring
a symlink or redefining NIX_PATH.
The nix.nixPath option only defines a default which means defining a value
will drop all of the defaults. This is because correct merge behaviour
isn't very clear for named entries.
This makes rollbacks more reliable, previously you had to fix your PATH
before calling darwin-rebuild. This works now:
$ /nix/var/nix/profiles/system-866-link/sw/bin/darwin-rebuild switch -G 866