:hammer_and_wrench: :heart: Want to know NixOS & Flakes in detail? Looking for a beginner-friendly tutorial? Then you've come to the right place! 想要学习使用 NixOS 与 Flakes 吗?在寻找一份新手友好的教程?那你可来对地方了!
lib.mkMerge & lib.mkIf is used by module system for lazy evaluation & mergeing, while lib.attrsets.mergeAttrsList & lib.optionals is only little nix functions. It's recommend to use lib.mkMerge & lib.mkIf only inside imports = [ ... ] and config = { ... }.
Related to:
lib.mkMerge
&lib.mkIf
is used by module system for lazy evaluation & mergeing, whilelib.attrsets.mergeAttrsList
&lib.optionals
is only little nix functions. It's recommend to uselib.mkMerge
&lib.mkIf
only insideimports = [ ... ]
andconfig = { ... }
.