nix: place extra-prefixed settings after their non-prefixed variants
Fixes #626. Essentially a copy of NixOS's workaround: https://github.com/NixOS/nixpkgs/pull/278064
This commit is contained in:
parent
a6746213b1
commit
5926058aec
1 changed files with 4 additions and 1 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue