···378378 zipAttrsWith (name: values: values) [{a = "x";} {a = "y"; b = "z";}]
379379 => { a = ["x" "y"]; b = ["z"] }
380380 */
381381- zipAttrsWith = f: sets: zipAttrsWithNames (concatMap attrNames sets) f sets;
381381+ zipAttrsWith =
382382+ builtins.zipAttrsWith or (f: sets: zipAttrsWithNames (concatMap attrNames sets) f sets);
382383 /* Like `zipAttrsWith' with `(name: values: values)' as the function.
383384384385 Example:
+1-1
lib/default.nix
···6666 stringLength sub substring tail trace;
6767 inherit (self.trivial) id const pipe concat or and bitAnd bitOr bitXor
6868 bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max
6969- importJSON importTOML warn warnIf throwIfNot
6969+ importJSON importTOML warn warnIf throwIfNot checkListOfEnum
7070 info showWarnings nixpkgsVersion version
7171 mod compare splitByAndCompare functionArgs setFunctionArgs isFunction
7272 toHexString toBaseDigits;
+7-8
lib/modules.nix
···3737 toList
3838 types
3939 warnIf
4040+ zipAttrsWith
4041 ;
4142 inherit (lib.options)
4243 isOption
···442443 }
443444 */
444445 byName = attr: f: modules:
445445- foldl' (acc: module:
446446- if !(builtins.isAttrs module.${attr}) then
446446+ zipAttrsWith (n: concatLists)
447447+ (map (module: let subtree = module.${attr}; in
448448+ if !(builtins.isAttrs subtree) then
447449 throw ''
448448- You're trying to declare a value of type `${builtins.typeOf module.${attr}}'
450450+ You're trying to declare a value of type `${builtins.typeOf subtree}'
449451 rather than an attribute-set for the option
450452 `${builtins.concatStringsSep "." prefix}'!
451453···454456 this option by e.g. referring to `man 5 configuration.nix'!
455457 ''
456458 else
457457- acc // (mapAttrs (n: v:
458458- (acc.${n} or []) ++ f module v
459459- ) module.${attr}
460460- )
461461- ) {} modules;
459459+ mapAttrs (n: f module) subtree
460460+ ) modules);
462461 # an attrset 'name' => list of submodules that declare ‘name’.
463462 declsByName = byName "options" (module: option:
464463 [{ inherit (module) _file; options = option; }]
+17
lib/trivial.nix
···347347 */
348348 throwIfNot = cond: msg: if cond then x: x else throw msg;
349349350350+ /* Check if the elements in a list are valid values from a enum, returning the identity function, or throwing an error message otherwise.
351351+352352+ Example:
353353+ let colorVariants = ["bright" "dark" "black"]
354354+ in checkListOfEnum "color variants" [ "standard" "light" "dark" ] colorVariants;
355355+ =>
356356+ error: color variants: bright, black unexpected; valid ones: standard, light, dark
357357+358358+ Type: String -> List ComparableVal -> List ComparableVal -> a -> a
359359+ */
360360+ checkListOfEnum = msg: valid: given:
361361+ let
362362+ unexpected = lib.subtractLists valid given;
363363+ in
364364+ lib.throwIfNot (unexpected == [])
365365+ "${msg}: ${builtins.concatStringsSep ", " (builtins.map builtins.toString unexpected)} unexpected; valid ones: ${builtins.concatStringsSep ", " (builtins.map builtins.toString valid)}";
366366+350367 info = msg: builtins.trace "INFO: ${msg}";
351368352369 showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
···265265 replacements.
266266 </para>
267267 </listitem>
268268+ <listitem>
269269+ <para>
270270+ <literal>services.thelounge.private</literal> was removed in
271271+ favor of <literal>services.thelounge.public</literal>, to
272272+ follow with upstream changes.
273273+ </para>
274274+ </listitem>
268275 </itemizedlist>
269276 </section>
270277 <section xml:id="sec-release-22.05-notable-changes">
···378385 can be found in
379386 <literal>pkgs.theLoungePlugins.plugins</literal> and
380387 <literal>pkgs.theLoungePlugins.themes</literal>.
388388+ </para>
389389+ </listitem>
390390+ <listitem>
391391+ <para>
392392+ The <literal>firmwareLinuxNonfree</literal> package has been
393393+ renamed to <literal>linux-firmware</literal>.
381394 </para>
382395 </listitem>
383396 </itemizedlist>
+4
nixos/doc/manual/release-notes/rl-2205.section.md
···8989 [upstream's release notes](https://github.com/iputils/iputils/releases/tag/20211215)
9090 for more details and available replacements.
91919292+- `services.thelounge.private` was removed in favor of `services.thelounge.public`, to follow with upstream changes.
9393+9294## Other Notable Changes {#sec-release-22.05-notable-changes}
93959496- The option [services.redis.servers](#opt-services.redis.servers) was added
···138140 is set to `true`.
139141140142- The option `services.thelounge.plugins` has been added to allow installing plugins for The Lounge. Plugins can be found in `pkgs.theLoungePlugins.plugins` and `pkgs.theLoungePlugins.themes`.
143143+144144+- The `firmwareLinuxNonfree` package has been renamed to `linux-firmware`.
+1-2
nixos/modules/hardware/all-firmware.nix
···3131 type = types.bool;
3232 description = ''
3333 Turn on this option if you want to enable all the firmware with a license allowing redistribution.
3434- (i.e. free firmware and <literal>firmware-linux-nonfree</literal>)
3534 '';
3635 };
3736···5150 config = mkMerge [
5251 (mkIf (cfg.enableAllFirmware || cfg.enableRedistributableFirmware) {
5352 hardware.firmware = with pkgs; [
5454- firmwareLinuxNonfree
5353+ linux-firmware
5554 intel2200BGFirmware
5655 rtl8192su-firmware
5756 rt5677-firmware
+8-3
nixos/modules/services/networking/thelounge.nix
···66 cfg = config.services.thelounge;
77 dataDir = "/var/lib/thelounge";
88 configJsData = "module.exports = " + builtins.toJSON (
99- { private = cfg.private; port = cfg.port; } // cfg.extraConfig
99+ { inherit (cfg) public port; } // cfg.extraConfig
1010 );
1111 pluginManifest = {
1212 dependencies = builtins.listToAttrs (builtins.map (pkg: { name = getName pkg; value = getVersion pkg; }) cfg.plugins);
···2020 '';
2121in
2222{
2323+ imports = [ (mkRemovedOptionModule [ "services" "thelounge" "private" ] "The option was renamed to `services.thelounge.public` to follow upstream changes.") ];
2424+2325 options.services.thelounge = {
2426 enable = mkEnableOption "The Lounge web IRC client";
25272626- private = mkOption {
2828+ public = mkOption {
2729 type = types.bool;
2830 default = false;
2931 description = ''
3030- Make your The Lounge instance private. You will need to configure user
3232+ Make your The Lounge instance public.
3333+ Setting this to <literal>false</literal> will require you to configure user
3134 accounts by using the (<command>thelounge</command>) command or by adding
3235 entries in <filename>${dataDir}/users</filename>. You might need to restart
3336 The Lounge after making changes to the state directory.
···7982 group = "thelounge";
8083 isSystemUser = true;
8184 };
8585+8286 users.groups.thelounge = { };
8787+8388 systemd.services.thelounge = {
8489 description = "The Lounge web IRC client";
8590 wantedBy = [ "multi-user.target" ];