Merge pull request #1337 from sandydoo/fix-extra-nix-conf

nix: place `extra-`prefixed settings after their non-prefixed variants
This commit is contained in:
Michael Hoang 2025-02-14 21:15:10 +07:00 committed by GitHub
commit 7206892913
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,13 +51,16 @@ let
mkKeyValuePairs = attrs: concatStringsSep "\n" (mapAttrsToList mkKeyValue attrs);
isExtra = key: hasPrefix "extra-" key;
in
pkgs.writeTextFile {
name = "nix.conf";
text = ''
# WARNING: this file is generated from the nix.* options in
# your nix-darwin configuration. Do not edit it!
${mkKeyValuePairs cfg.settings}
${mkKeyValuePairs (filterAttrs (key: value: !(isExtra key)) cfg.settings)}
${mkKeyValuePairs (filterAttrs (key: value: isExtra key) cfg.settings)}
${cfg.extraOptions}
'';
checkPhase =