summaryrefslogtreecommitdiff
path: root/modules/system
AgeCommit message (Collapse)Author
2023-07-10Add system.systemBuilderCommands and systemBuilderArgsMarco Rebhan
These are the equivalents of the NixOS options with the same name, introduced in https://github.com/NixOS/nixpkgs/commit/d3ac0938a7a0ce6455fc580f16eb7476cca87dc6. Allows running extra commands while building the system configuration output, for example to add extra files into the output directory, and passing arguments to the system builder's mkDerivation.
2023-07-09eval-config: rationalize handling of NixpkgsEmily
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-09version: rewrite Git revision logicEmily
We trust the version information from `nixpkgs.source` when `pkgs` was constructed by the `nixpkgs` module or `nixpkgs.source` was explicitly set by the configuration. Otherwise, we rely on Nixpkgs to report its own version, which handles the same cases as the old logic and opens the door to Nixpkgs automatically reporting the correct revision when using flakes.
2023-07-09version: default Git revision options to `null`Emily
This allows for more uniform handling in the documentation generator, and avoids lying about the Git reference being `master` internally.
2023-06-27feat: add dock icon magnification settingsPiotr Żelazko
2023-06-24treewide: convert all option docs to MarkdownEmily
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-24treewide: manually convert some docs to MarkdownEmily
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-24treewide: tweak DocBook docs for conversionEmily
These help `nix-munge-doc` automate more of the Markdown conversion process. See the following nixpkgs commits for explanations of many of these changes: * https://github.com/NixOS/nixpkgs/commit/275a34e0d8a937a81b267e47302dd8a92fa781df * https://github.com/NixOS/nixpkgs/commit/694d5b19d30bf66687b42fb77f43ea7cd1002a62 * https://github.com/NixOS/nixpkgs/commit/f1d39b6d6187997b630647400c5efe5b01e06a23 * https://github.com/NixOS/nixpkgs/commit/16102dce2fbad670bd47dd75c860a8daa5fe47ad 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-23activity monitor: change settings to nullzowoq
treewide these seem to be the only settings that aren't unset by default which seems inconsistent
2023-06-20Merge pull request #671 from sxyazi/pr-e0f2168dDaiderd Jordan
Add `mouseDriverCursorSize` option
2023-06-20Merge pull request #672 from sxyazi/pr-af01ed5dDaiderd Jordan
Add `AppleScrollerPagingBehavior` option
2023-06-20Merge pull request #673 from sxyazi/pr-4df4da65Daiderd Jordan
feat: add `AppleWindowTabbingMode` option
2023-06-06system/checks: allow disabling the buildUsers checkCole Helbling
This allows systems with auto-allocate-uids enabled to work (by disabling this check).
2023-05-31flakes: Do not verify channels when using flakes.John Soo
2023-05-27feat: use enum instead of str for constraints nicersxyazi
2023-05-27feat: add `AppleWindowTabbingMode` optionsxyazi
2023-05-27feat: add `AppleScrollerPagingBehavior` optionsxyazi
2023-05-27fix: typesxyazi
2023-05-27feat: add `mouseDriverCursorSize` optionsxyazi
2023-05-22Merge pull request #616 from gshpychka/patch-1Daiderd Jordan
feat: support writing arrays to system defaults
2023-05-15refactor: rename clock option menuExtraClockHraban Luyat
2023-05-15feat: defaults write com.apple.menuextra.clockHraban Luyat
2023-05-15Merge pull request #654 from shivaraj-bh/authorized-keysDomen Kožar
Manage SSH authorized keys for users
2023-05-10Merge pull request #638 from aerialls/screensaverDaiderd Jordan
feat(screensaver): add support of askForPassword and askForPasswordDelay
2023-05-10don't check knownSha256 for authorized_keys filessbh69840
2023-05-10support authorized_keys for userssbh69840
2023-04-30feat(screensaver): add support of askForPassword and askForPasswordDelayJulien Brochet
2023-03-14feat: support writing arrays to system defaultsGlib Shpychka
2023-03-07Only use `--force` for patches applied in reverseMarwan Aljubeh
Using `--forward` already instructs `--patch` to ignore patches that it thinks are reversed or already applied.
2023-03-07Add `--force` to all patch invocationsMarwan Aljubeh
2023-03-07Fix system.patchesMarwan Aljubeh
Currently, `system.patches` doesn't work because it will attempt to first detect if the patch has already been applied by checking if it can be applied in reverse. However, when that happens, `patch` detects that the supplied patch is incorrectly reversed and attempts to ask the user if they want to "Ignore -R": ``` Unreversed (or previously applied) patch detected! Ignore -R? [y] ``` Because the output is piped to `/dev/null` the user will basically see nothing and `darwin-rebuild switch` will hang until the user presses "Enter" (possibly to check if the terminal is frozen). At which point, patch will ignore the --reverse and exit successfully, preventing the patch from being applied at all. This change fixes that bug by using `--force` which tells patch that we know what we're doing and prevents it from prompting the user if they want to ignore `--reverse`.
2022-12-16Merge pull request #452 from psm14/mouse-scalingDomen Kožar
add mouse scaling system setting
2022-12-13Add option to set 24-hour timeSlim Lim
Normally, the system region setting determines whether the clock uses 12- or 24-hour time. This flag allows users to override this setting and use 24-hour time even if their region does not.
2022-11-01Merge pull request #470 from toonn/berbiche-fix-applications-symlinkDomen Kožar
Disable taking control of ~/Applications folder MkII
2022-10-24#517: custom preferences for 'defaults' can be specifiedPavel Shirshov
2022-09-25rename runCommandNoCCJames Walker
2022-09-20Merge pull request #228 from malob/sudo-touchidDomen Kožar
Add option to enable sudo authentication with Touch ID
2022-09-13applications: Drop store prefix to generalizetoonn
While the Nix store is almost always at `/nix/store`, we shouldn't assume it to be. Checking only the trailing part of the link is less exact but removes this bad assumption. I also added a check for the symlink's contents when overwriting it to more accurately check whether we own it and should replace it.
2022-09-13applications: Symlink Nix Apps to /Applicationstoonn
This PR supercedes #226. So far application bundles were always linked to `~/Applications` or `~/Applications/Nix Apps` if the former was an existing directory. In nix-community/home-manager#1341 a conflict was found with suggested new Home Manager behavior, where applications installed through Home Manager would end up in `~/Applications/Home Manager Apps`. This was in an attempt to make them discoverable through Spotlight but further investigation suggest Spotlight does not pick up symlinked apps (details in the issue). However, there are other programs that expect to be able to write to `~/Applications` so taking over the directory is unfortunate. PR #226 dropped linking `~/Applications` and instead made sure the directory exists so we can always link in `~/Applications/Nix Apps`. After further discussion in #macos:nixos.org we came to the conclusion that we shouldn't link applications to a user directory at all. Since we manage packages for multiple users, application bundles should go in `/Applications`. Because previous code will likely leave a symlink at `~/Applications/{,Nix Apps}`, which will become dangling once the path it links to is garbage collected from the store we test to see if a link exists and it conforms to the path we're expecting and if it does remove it.
2022-09-13Disable taking control of ~/Applications folderNicolas Berbiche
Programs like Steam add applications to ~/Applications and such. This commit disables linking ~/Applications to nix-darwin Applications in the /nix/store and makes nix-darwin use a subfolder within ~/Applications.
2022-08-29Transition to using native floatsMalo Bourgon
2022-08-22Merge pull request #490 from malob/update-nix-moduleDomen Kožar
Bring `nix` module back in sync with the NixOS module (as much as possible)
2022-08-20feat: provide option to display the appswitcher on all displaysJan Schmitt
2022-08-16Add .nix-defexpr to NIX_PATH the way the NixOS module doesMalo Bourgon
2022-08-16Move build user options to `nix` module to improve overlap with NixOSMalo Bourgon
Also add `config.ids` like in NixOS.
2022-08-06add mouse scaling system settingPat McLaughlin
2022-07-12Add option to set com.apple.screencapture typeDaniel Santa Cruz
2022-06-30Change option name and switch to using activation scriptMalo Bourgon
2022-06-30Add option to enable sudo authentication with TouchIDMalo Bourgon
2022-04-25Merge pull request #447 from dsyang/additional-optionsDaiderd Jordan
add options for configuring activity monitor