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

76 commits

Author SHA1 Message Date
Emily
f9724c4543 eval-config: rationalize handling of Nixpkgs
This is a big change that disentangles a lot of mistaken assumptions
about mixing multiple versions of Nixpkgs, treating external flake
inputs as gospel for the source of Nixpkgs and nix-darwin, etc.;
the end result should be much simpler conceptually, but it will be a
breaking change for anyone using `eval-config.nix` directly. Hopefully
that shouldn't be a big issue, as it is more of an internal API and
it's quite likely that existing uses may have been broken in the same
way the internal ones were.

It was previously easy to get into a state where your `lib` comes
from nix-darwin's `nixpkgs` input or a global channel and your
`pkgs` comes from another major version of Nixpkgs. This is pretty
fundamentally broken due to the coupling of `pkgs` to its corresponding
`lib`, but the brokenness was hidden much of the time until something
surfaced it. Now there is exactly one mandatory `lib` input to system
evaluation, and the handling of various additional options like `pkgs`
and `system` can be done modularly; maintaining backwards compatibility
with the previous calling convention is punted to the `default.nix`
and `lib.darwinSystem` entry points. `inputs` is no longer read by
nix-darwin or special in any way, merely a convention for user code,
and the argument is retained in the entry points only for backwards
compatibility.

All correct invocations of the entry points should keep working
after this change, and some previously-broken ones should be fixed
too. The documentation and template have been adjusted to show the
newly-recommended modular way of specifying various things, but no
deprecation warnings have been introduced yet by this change.

There is one potential, mostly cosmetic regression:
`system.nixpkgsRevision` and related options are less likely to be
set than before, in cases where it is not possible to determine the
origin of the package set. Setting `nixpkgs.source` explicitly will
make this work again, and I hope to look into sending changes upstream
to Nixpkgs to make `lib.trivial.revisionWithDefault` behave properly
under flakes, which would fix this regression and potentially allow
reducing some of the complexity.

Fixes: #669
2023-07-09 11:21:40 +01:00
Robert Hensing
d207fa6091 default.nix: Use nixpkgs.rev if it is set
This increases the odds of automatically setting system.nixpkgsRevision,
which makes the links in the manual nice.
2023-06-30 02:13:09 +02:00
Drew Hess
9f7e95887f
Pass system to darwinSystem rather than eval-config.
This allows us to specify what kind of darwinSystem we want to build,
rather than determining it at evaluation time.
2021-09-08 13:05:18 +01:00
Daiderd Jordan
5dfd0c4485
reuse evalConfig in default.nix 2020-10-25 14:49:15 +01:00
Bas van Dijk
03d3931656 darwin-[un]installer: make sure all dependencies are part of the closure
This makes sure the `darwin-installer` and `darwin-uninstaller`
packages can be nix copied to any target and reliably be executed
there.
2020-08-21 21:22:09 +02:00
Daiderd Jordan
073935fb99
fix evaluation of darwin.pkgs for recent nixpkgs
The _module attribute was renamed in dcdd232939.
2020-03-22 23:13:59 +01:00
Daiderd Jordan
631fd857aa
modules: add modules-list.nix and baseModules argument 2019-05-04 14:50:22 +02:00
Daiderd Jordan
1e67f6a2bc
sandbox: add module for sandbox profiles
This could be used outside of nix-darwin, but this is mainly useful for
services since all of the inputs are known there.

	{
	  # $ /usr/bin/sandbox-exec -f $profile $coreutils/bin/ls /
	  # ls: cannot access '/': Operation not permitted
	  security.sandbox.profiles.example.closure = [ pkgs.coreutils ];
	}
2019-02-16 16:55:07 +01:00
Daiderd Jordan
2e525a93da
security.pki: add module to configure ca certificates
This makes NIX_SSL_CERT_FILE configurable and makes
/etc/ssl/certs/ca-certificates.crt available like nixos.
2019-01-15 21:55:08 +01:00
Piotr Limanowski
7a7cbdc165 initialise fonts module 2018-09-30 13:22:24 +02:00
Mario Rodas
5d272ddaf2 synapse-bt: add synapse-bt service 2018-09-15 15:37:22 -05:00
Michael Hoang
6d013ea166 synergy: Add module for client and server 2018-09-14 20:48:23 +10:00
Carlos D
41a6a40f53 Add a privoxy service 2018-08-02 10:09:22 +10:00
Periklis Tsirakidis
b85d89a1ae Init offlineimap service 2018-06-04 16:25:07 +02:00
Kirill Elagin
8e1f40ad48
gnupg: add gpg-agent service
Fixes #77.
2018-05-18 23:19:06 +03:00
Daiderd Jordan
2b721afd99
ssh: add option to configure known hosts 2018-03-06 20:42:33 +01:00
Piotr Limanowski
577961c162 adds skhd module 2018-03-03 15:25:43 +01:00
cmacrae
55f4331e73 defaults: Add screencapture.location 2018-02-27 17:24:45 +00:00
Rodney Lorrimar
ed6e80a179 buildkite-agent service: init for nix-darwin 2018-02-23 12:29:55 +00:00
Daiderd Jordan
5fa6f21d06
ofborg: init service 2018-01-29 22:37:25 +01:00
Daiderd Jordan
02a8d469da
bash: move file 2018-01-20 01:35:42 +01:00
Daiderd Jordan
c0f913d2ae
checks: rename file 2018-01-17 23:28:54 +01:00
Daiderd Jordan
6e42f63784
uninstaller: init 2018-01-15 01:12:26 +01:00
Daiderd Jordan
4e0ddf3061
users: add option to configure nixbld users. 2018-01-14 16:58:09 +01:00
Daiderd Jordan
32481b542b
installer: init 2018-01-13 23:33:27 +01:00
Daiderd Jordan
3db35e87f0
users: move submodules to separate files 2018-01-13 13:52:30 +01:00
Daiderd Jordan
b8713d540c
users: add options for user creation 2018-01-13 13:42:49 +01:00
Daiderd Jordan
b593f31822
users: add options to create user groups 2018-01-13 02:01:15 +01:00
Daiderd Jordan
edc3be51ce
keyboard: add options for keyboard mappings
Fixes #55
2018-01-08 22:01:44 +01:00
Daiderd Jordan
6fe46e8335
add _file for anonymous packages module 2018-01-06 23:21:34 +01:00
Daiderd Jordan
9780fb0f0b
nixpkgs: add support for overlays 2018-01-06 23:20:43 +01:00
Daiderd Jordan
7eb4e21075
defaults: add option for NetBIOSName 2018-01-05 00:16:09 +01:00
Daiderd Jordan
ba7202e789
environment-shells: add option to manage /etc/shells 2017-12-13 23:02:11 +01:00
Daiderd Jordan
c4e213745a
security-accessibility: remove options
The accessibility database has been protected with SIP since macOS
10.12 and there doesn't seem to be another way to configure this
programmatically.
2017-11-29 00:14:31 +01:00
Daiderd Jordan
e828743829
nix-info: install by default 2017-10-20 22:23:51 +02:00
Daiderd Jordan
d4f3a3a8a9
set modulesPath 2017-10-20 22:19:26 +02:00
Daiderd Jordan
cf9f74596a
system-version: add system.stateVersion option 2017-10-01 16:37:51 +02:00
Daiderd Jordan
6fa180702b
modules: add redis service 2017-09-07 22:39:35 +02:00
Daiderd Jordan
45d259cb3e
add programs.nix-index module 2017-07-28 23:17:53 +02:00
Daiderd Jordan
8016f1e2fd
add activation-checks 2017-07-23 16:05:46 +02:00
Daiderd Jordan
3730fdf15e
enable activate-system serice by default 2017-07-17 21:46:35 +02:00
Daiderd Jordan
d049c7b97a
hydra: use nix.gc.automatic 2017-07-17 21:42:27 +02:00
Daiderd Jordan
ebc7f7b2da Merge pull request #39 from peel/f-networking
Adds an idea for networking module
2017-07-06 21:52:21 +02:00
Piotr Limanowski
8fe2cff0cc
Adds an idea for networking module
The idea is to follow: https://nixos.org/nixos/options.html#networking so we can
share even more configuration ideas from NixOS.
2017-07-05 22:17:58 +02:00
Daiderd Jordan
22be829197 Merge pull request #36 from peel/master
Adds support for ChunkWM
2017-07-03 20:27:45 +02:00
Daiderd Jordan
acd0fee357
postgresql: init service 2017-07-02 18:39:07 +02:00
Piotr Limanowski
e33942bab2
Adds support for ChunkWM 2017-06-29 07:24:02 +02:00
Daiderd Jordan
d5596d5df2
programs-info: add module and run install-info on system packages.
Fixes #25
2017-05-21 10:51:01 +02:00
Daiderd Jordan
290b1d8aad
system-packages: link applications to ~/Applications 2017-05-20 14:23:05 +02:00
Daiderd Jordan
2fda5848bb
kwm: add option to manage config in /etc/kwmrc
Fixes #24
2017-05-20 13:14:17 +02:00