Skip to content

Commit

Permalink
Merge pull request #1338 from Enzime/push-nxtlkvowmzpy
Browse files Browse the repository at this point in the history
[24.11] nix: place `extra`-prefixed settings after their non-prefixed variants
  • Loading branch information
Enzime authored Feb 14, 2025
2 parents f81c161 + c363e6c commit e904ef0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,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 =
Expand Down

0 comments on commit e904ef0

Please sign in to comment.