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

138 commits

Author SHA1 Message Date
Michael Hoang
d2b70c61bf tailscale: improve MagicDNS setup 2023-06-27 01:38:51 +10:00
Daiderd Jordan
cb37c35e33
fix darwin-option descriptions
Also drops the eval hacks in favour of jq.
2023-06-25 13:03:52 +02:00
Emily
e65131e69c treewide: convert all option docs to Markdown
This process was automated by [my fork of `nix-doc-munge`]; thanks
to @pennae for writing this tool! It automatically checks that the
resulting documentation doesn't change, although my fork loosens
this a little to ignore some irrelevant whitespace and typographical
differences.

As of this commit there is no DocBook remaining in the options
documentation.

You can play along at home if you want to reproduce this commit:

    $ NIX_PATH=nixpkgs=flake:nixpkgs/c1bca7fe84c646cfd4ebf3482c0e6317a0b13f22 \
      nix shell nixpkgs#coreutils \
      -c find . -name '*.nix' \
      -exec nix run github:emilazy/nix-doc-munge/0a7190f600027bf7baf6cb7139e4d69ac2f51062 \
      {} +

[my fork of `nix-doc-munge`]: https://github.com/emilazy/nix-doc-munge
2023-06-24 10:48:55 +01:00
Emily
efe314cdba treewide: manually convert some docs to Markdown
These all use DocBook markup too complex for `nix-doc-munge` to handle,
have syntax that clashes with Markdown, or already contain Markdown
syntax that currently isn't rendering correctly.

Converting DocBook list syntax makes me think that maybe Markdown
isn't so bad after all.
2023-06-24 10:48:55 +01:00
Emily
b97c235e37 treewide: tweak DocBook docs for conversion
These help `nix-munge-doc` automate more of the Markdown conversion
process. See the following nixpkgs commits for explanations of many
of these changes:

* 275a34e0d8
* 694d5b19d3
* f1d39b6d61
* 16102dce2f

I couldn't think of any particularly good way to format the
`system.defaults` breadcrumbs, so I just made them standalone
paragraphs. They weren't rendering correctly in DocBook anyway.
2023-06-24 10:48:55 +01:00
Cathal Mullan
51b8bdfc0e
nix: Add build machines protocol option. 2023-06-10 13:44:37 +01:00
Andrew Marshall
fa97d79567 nix: Fix registry extra attrs not being applied
This was
    mkDefault { } // filterAttrs () x

which is interpreted as
    (mkDefault { }) // (filterAttrs () x)

but the intention is
    mkDefault ({ } // filterAttrs () x)

Resulting in lastModified, rev, etc. not being included. This is
essentially just bringing this clause up-to-date with the one from
NixOS.
2023-05-04 23:53:14 -04:00
Andrew Childs
d0121790d4 nix: fix mandatoryFeatures in nix.buildMachines
Copied directly from https://github.com/NixOS/nixpkgs/pull/193404
2022-10-03 12:33:21 +09:00
Malo Bourgon
5fa362c32f Transition to using native floats 2022-08-29 15:39:16 -07:00
Domen Kožar
5af1aa51f6
Merge pull request #490 from malob/update-nix-module
Bring `nix` module back in sync with the NixOS module (as much as possible)
2022-08-22 09:55:24 +02:00
Malo Bourgon
796a72f0fe Update changelog 2022-08-16 17:41:13 -07:00
Malo Bourgon
ffc8ec5c9a Add .nix-defexpr to NIX_PATH the way the NixOS module does 2022-08-16 17:41:08 -07:00
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
Malo Bourgon
08edc0e19a Update/adapt daemon CPU/IO priority options in nix module
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`.
2022-08-16 10:41:51 -07:00
Malo Bourgon
7e74c1c9fb Move build user options to nix module to improve overlap with NixOS
Also add `config.ids` like in NixOS.
2022-08-16 10:41:51 -07:00
Malo Bourgon
f88286eda0 Update nix.registry definition to match NixOS module 2022-08-16 10:41:51 -07:00
Malo Bourgon
7648c9befc Refactor nix.nixPath to make diff easier to compare with NixOS module 2022-08-16 10:41:51 -07:00
Malo Bourgon
c3bdd6d95f Update nix.buildMachines def and implementation to match NixOS module 2022-08-16 10:41:51 -07:00
Malo Bourgon
39cf1e6fbe Minor tweaks to nix module options defs 2022-08-16 10:41:51 -07:00
Malo Bourgon
d44b8be38c Reorder nix module implementation to better match order of NixOS module 2022-08-16 10:41:51 -07:00
Malo Bourgon
5786c079f8 Make nix.settings docs specific to (nix-)darwin where applicable 2022-08-16 10:41:51 -07:00
Malo Bourgon
a00b3836a5 Update nix.settings def and implementation to match NixOS module 2022-08-16 10:41:51 -07:00
Malo Bourgon
5f141365af Update def and implementation of nix.package to match NixOS module
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.
2022-08-16 10:41:51 -07:00
Malo Bourgon
490ef80485 Reindent/format nix module to more closely match NixOS module 2022-08-16 10:41:51 -07:00
Malo Bourgon
9a5fb50ea9 Reorder nix module options to match order in NixOS module 2022-08-16 10:41:51 -07:00
Malo Bourgon
f729a09a28 Update nix module to use settings sub options like in NixOS module
Also update option definitions to match those in `nixpkgs` where it
makes sense.
2022-08-16 10:41:51 -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
Daiderd Jordan
b1a264c928
make nixpkgs and system overridable for ./release.nix 2017-01-15 09:51:00 +01:00
Daiderd Jordan
5a5ec9ac42
nix.distributedBuilds: create directory for current load 2017-01-09 22:30:15 +01:00
Daiderd Jordan
e925a2d50e
nix: only include build-users-group if the nix-daemon service is enabled 2017-01-05 23:12:47 +01:00
Daiderd Jordan
b4cb5280b0
don't include build-sandbox-paths by default in nix.conf 2017-01-04 20:25:56 +01:00
Daiderd Jordan
dc5c27a650
remove unused nixbldUsers 2016-12-19 20:12:28 +01:00
Daiderd Jordan
3e4583ee9a
change default nix.nixPath to work for single user installs 2016-12-15 14:37:31 +01:00
Daiderd Jordan
5949d2ed5d
fix cert bundle for services.nix-daemon 2016-12-15 14:27:47 +01:00
Daiderd Jordan
125dcb48b0
add nix module 2016-12-15 13:26:22 +01:00
Daiderd Jordan
8708ebb796
move nix-tools out of nix expression 2016-12-12 17:34:43 +01:00
Daiderd Jordan
98f6b407ec
add separate tools to systemPackages 2016-12-12 11:08:23 +01:00
Daiderd Jordan
da4433fbf8
add nix-tools to environment.systemPackages by default 2016-12-11 16:33:42 +01:00
Daiderd Jordan
41d40d0417
add nixpkgs.config option 2016-12-11 16:25:28 +01:00
Daiderd Jordan
6ca27b9903
add nix-tools and use <darwin-config> instead of config.nix 2016-12-11 12:49:11 +01:00