1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00
Commit graph

63 commits

Author SHA1 Message Date
Yonathan Randolph
2120245fc2 Fix #387 nix-rebuild --flake without XCode tools
Add nixpkgs git to PATH before /usr/bin/git so that when nix flake metadata invokes git, it does not invoke the XCode one.
2022-08-16 13:55:13 -07:00
Michael Hoang
5528b36698 eval-config: Support passing in pkgs
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`.
2022-02-04 21:32:40 +11:00
John Soo
e5ba780a76 nixpkgs: Allow functors.
Replace builtins.isFunction with lib.isFunction, which allows functors.
2022-01-04 16:38:14 -07:00
Daiderd Jordan
40b518d336
nix: extend nix.conf content whitelist
Fixes #407
2022-01-02 11:50:09 +01:00
Daiderd Jordan
44da835ac4
add forward compatibility for literalExample deprecation
Fixes #367
2021-10-23 15:06:42 +02:00
Quentin Gliech
456f17b4d9
nix.registry option 2020-12-22 19:44:21 +01:00
Daiderd Jordan
a97f690dcc
darwin-rebuild: add jq to path for flakes 2020-11-15 15:42:39 +01:00
Daiderd Jordan
74eb216078
remove nix 1.x config compatibility 2020-10-25 15:56:29 +01:00
Daiderd Jordan
20b9f53035
etc: add known hashes for bashrc/zsh/nix.conf 2020-06-17 19:37:07 +02:00
Jörg Thalheim
eb7b41a2a0 nix: better defaults settings for maxJobs/buildCores
most users just want to use all available cores.
This commit aligns our defaults with what we do in NixOS
2020-05-30 02:14:06 +01:00
Daiderd Jordan
1436543221
nix: kickstart and wait for the nix-daemon service 2020-03-28 19:18:21 +01:00
Daiderd Jordan
8c2b25e60d
nix: fix useDaemon conditions
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.
2019-07-01 21:24:29 +02:00
Daiderd Jordan
58aa5bf185
nix: make nix.nixPath merge by default
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
2019-05-01 12:42:31 +02:00
Daiderd Jordan
4d235b800d
nix: allow specifying named NIX_PATH using and attrset
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.
2019-05-01 12:30:00 +02:00
Daiderd Jordan
0146366b21
Revert "nix: make channel entries for NIX_PATH dynamic"
This reverts commit 95fb1cb2aa, 1324ccf2c1 and e5c988edf1.
2018-10-26 18:05:33 +01:00
Daiderd Jordan
95fb1cb2aa
nix: make channel entries for NIX_PATH dynamic
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
2018-10-26 15:49:24 +01:00
Daiderd Jordan
48f3ed6301
nix: only set NIX_REMOTE for nix 1.11
This isn't needed anymore, nix 2.0 figures this out automatically now.
2018-09-14 21:40:19 +02:00
Daiderd Jordan
f473b21c9f
environment: add darwinConfig option to set darwin-config in NIX_PATH
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.
2018-08-26 14:09:01 +02:00
Daiderd Jordan
6dbc6d43b5
nixpkgs: replace usage of deprecated traceValIfNot 2018-05-04 19:12:43 +02:00
Daiderd Jordan
7b028e944b
nix: use literalExample for package 2018-03-29 22:40:51 +02:00
Daiderd Jordan
eb1a841b4f
nix: use mkDefault for nix profile 2018-03-29 22:09:26 +02:00
Daiderd Jordan
22e832628f
nix: add version option
This can be used to declare the system version of nix when a profile is
used instead of a package.
2018-03-29 21:19:37 +02:00
Daiderd Jordan
cd049bfdf6
nix: use pkgs.nix by default instead of the default profile
This fixes version detection for 2.0.
2018-03-29 21:10:18 +02:00
Daiderd Jordan
f2ff808a4f
nix: update config options for 2.0 2018-03-26 22:14:58 +02:00
Daiderd Jordan
3bf2c6652f
nix: don't set signed-binary-caches for nix 2.0
The option was removed.
2018-02-01 20:02:35 +01:00
Daiderd Jordan
dc33fe3d89
system: use preferLocalBuild for simple derivations
Most of the builds like system.build.etc will be faster when built
locally, they also don't depend on CC.
2018-01-21 13:46:30 +01:00
Daiderd Jordan
2aeaa86bc7
formatting 2018-01-17 00:39:02 +01:00
Daiderd Jordan
f8353f2336
nix: remove redundant user check 2018-01-17 00:36:38 +01:00
Daiderd Jordan
53517162da
nix: fix daemon check, only set if store is not writable
Fixes issues for a single-user install introduced in
9792b08fdf.
2018-01-16 20:32:29 +01:00
Daiderd Jordan
86fe053806
darwin: include nix in PATH
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
2018-01-14 22:24:36 +01:00
Daiderd Jordan
937bf1e83c
nix: add note about multi-user installs for distributed builds 2018-01-14 16:08:27 +01:00
Daiderd Jordan
59421c7d76
nix: add to systemPackages when nix.package is set 2018-01-13 18:18:48 +01:00
Daiderd Jordan
c2a0025f7a
nix: add warning for distributed builds 2018-01-09 22:34:28 +01:00
Daiderd Jordan
9780fb0f0b
nixpkgs: add support for overlays 2018-01-06 23:20:43 +01:00
Daiderd Jordan
9792b08fdf
nix: allways set NIX_REMOTE=daemon when the db isn't writable 2018-01-03 23:04:43 +01:00
Daiderd Jordan
f63f4fe3fb
nix: reload daemon when nix.conf changes 2018-01-03 20:10:24 +01:00
Daiderd Jordan
de97d16af1
whitespace 2017-10-20 22:29:26 +02:00
Daiderd Jordan
e828743829
nix-info: install by default 2017-10-20 22:23:51 +02:00
Daiderd Jordan
d3941dc5ec
nix: use old default for nix.nixPath with system.stateVersion = 1 2017-10-01 16:37:51 +02:00
Daiderd Jordan
184e9f34be
nix: include user channels in NIX_PATH 2017-09-06 23:39:15 +02:00
Daiderd Jordan
1d0ecb8914
nix: look for <darwin> in channels by default 2017-07-23 18:13:18 +02:00
Daiderd Jordan
8016f1e2fd
add activation-checks 2017-07-23 16:05:46 +02:00
Daiderd Jordan
1eadb10b9b
nix: include root channels in default NIX_PATH 2017-07-22 17:38:37 +02:00
Daiderd Jordan
dc6b81a4b3
nix: add support for nix 1.12 2017-07-18 22:32:39 +02:00
Daiderd Jordan
a31b3699b4
nix: include cache.nixos.org by default 2017-07-18 21:13:36 +02:00
Daiderd Jordan
2156c30ad2
nix-daemon: fix eval 2017-07-18 20:32:32 +02:00
Daiderd Jordan
b883ae533f
nix-daemon: fix nixbld group warning 2017-07-18 20:19:53 +02:00
Daiderd Jordan
e88b408ee7
nix-daemon: unset NIX_REMOTE if there are no build users. 2017-05-20 13:54:48 +02:00
Daiderd Jordan
39827d4335
nix-daemon: fix activation script 2017-02-19 15:49:54 +01:00
Daiderd Jordan
7047071266
nix: show warning when using distributed builds without services.activate-system 2017-02-19 13:32:22 +01:00