1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-06 16:57:08 +00:00
nix-darwin/modules
Emily cd445c5465 nix: catch reads of unmanaged defaults
When we’re not managing the Nix installation, these defaults
aren’t used out of the box and won’t accurately represent the
state of any unmanaged Nix or the desired Nix package, so reading
the option defaults is a bug.

This was previously a warning for `nix.package` and a silent failure
for all the others. Now that all the problematic accesses in nix-darwin
have been appropriately conditionalized, and since a throw gives a
backtrace where a warning doesn’t, give throwing defaults to all the
`nix.*` options that don’t reflect reality and that that modules
shouldn’t be reading when `nix.enable` is off.

I’m not in love with the implementation strategy here… ideally
we’d think of something better than this and then upstream it to
NixOS. `nix.nrBuildUsers` growing a fake default that is never used
is particularly unfortunate. But this should hopefully catch mistakes
in module code reasonably reliably.
2025-02-11 20:10:55 +00:00
..
documentation Reapply "eval-config: set class" 2024-06-13 14:35:20 +01:00
environment {environment,readme}: default configuration path to /etc/nix-darwin 2025-01-27 23:10:14 +00:00
examples nix: remove nix.configureBuildUsers 2025-02-07 19:44:59 +00:00
fonts fonts: remove fonts.fontDir.enable 2024-06-13 11:56:58 +01:00
launchd feat: use wait4path with script launchd option 2024-09-22 15:30:21 +10:00
lib write-text: remove support for copy 2024-06-15 12:15:13 +01:00
misc module: add prometheus-node-exporter service 2024-10-31 02:08:34 +01:00
networking system: tweak ShellCheck settings 2025-01-18 19:34:21 +00:00
nix nix: catch reads of unmanaged defaults 2025-02-11 20:10:55 +00:00
power power: move the check for restartPowerfailure support to checks.nix 2024-12-29 12:13:54 +01:00
programs Merge pull request #1233 from adamcstephens/fish/package 2024-12-29 10:04:09 +11:00
security treewide: remove lib.mdDoc 2024-04-19 04:05:50 +02:00
services cachix-agent: check for nix.enable 2025-02-11 20:10:55 +00:00
system Merge pull request #1313 from emilazy/push-tzwxwyvonslk 2025-02-11 19:30:41 +00:00
time time: shellcheck fix 2024-11-05 11:12:21 +10:00
users users: use launchctl managername to determine session type 2025-02-07 18:03:36 +00:00
alias.nix Update def and implementation of nix.package to match NixOS module 2022-08-16 10:41:51 -07:00
homebrew.nix homebrew: use mas from Nixpkgs 2025-02-08 16:18:38 +00:00
meta.nix treewide: remove lib.mdDoc 2024-04-19 04:05:50 +02:00
module-list.nix openssh: init module 2025-01-10 10:23:09 +11:00