Skip to content

Commit

Permalink
Merge pull request #1337 from sandydoo/fix-extra-nix-conf
Browse files Browse the repository at this point in the history
nix: place `extra-`prefixed settings after their non-prefixed variants
  • Loading branch information
Enzime authored Feb 14, 2025
2 parents a674621 + 5926058 commit 7206892
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 @@ -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 =
Expand Down

0 comments on commit 7206892

Please sign in to comment.