···247247 </listitem>
248248 <listitem>
249249 <para>
250250+ The new option <literal>users.motdFile</literal> allows
251251+ configuring a Message Of The Day that can be updated
252252+ dynamically.
253253+ </para>
254254+ </listitem>
255255+ <listitem>
256256+ <para>
250257 Resilio sync secret keys can now be provided using a secrets
251258 file at runtime, preventing these secrets from ending up in
252259 the Nix store.
+2
nixos/doc/manual/release-notes/rl-2305.section.md
···72727373- A new `virtualisation.rosetta` module was added to allow running `x86_64` binaries through [Rosetta](https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment) inside virtualised NixOS guests on Apple silicon. This feature works by default with the [UTM](https://docs.getutm.app/) virtualisation [package](https://search.nixos.org/packages?channel=unstable&show=utm&from=0&size=1&sort=relevance&type=packages&query=utm).
74747575+- The new option `users.motdFile` allows configuring a Message Of The Day that can be updated dynamically.
7676+7577- Resilio sync secret keys can now be provided using a secrets file at runtime, preventing these secrets from ending up in the Nix store.
76787779- The `services.fwupd` module now allows arbitrary daemon settings to be configured in a structured manner ([`services.fwupd.daemonSettings`](#opt-services.fwupd.daemonSettings)).
+18-2
nixos/modules/security/pam.nix
···694694 optionalString (cfg.limits != []) ''
695695 session required ${pkgs.pam}/lib/security/pam_limits.so conf=${makeLimitsConf cfg.limits}
696696 '' +
697697- optionalString (cfg.showMotd && config.users.motd != null) ''
697697+ optionalString (cfg.showMotd && (config.users.motd != null || config.users.motdFile != null)) ''
698698 session optional ${pkgs.pam}/lib/security/pam_motd.so motd=${motd}
699699 '' +
700700 optionalString (cfg.enableAppArmor && config.security.apparmor.enable) ''
···775775 };
776776 }));
777777778778- motd = pkgs.writeText "motd" config.users.motd;
778778+ motd = if isNull config.users.motdFile
779779+ then pkgs.writeText "motd" config.users.motd
780780+ else config.users.motdFile;
779781780782 makePAMService = name: service:
781783 { name = "pam.d/${name}";
···11991201 description = lib.mdDoc "Message of the day shown to users when they log in.";
12001202 };
1201120312041204+ users.motdFile = mkOption {
12051205+ default = null;
12061206+ example = "/etc/motd";
12071207+ type = types.nullOr types.path;
12081208+ description = lib.mdDoc "A file containing the message of the day shown to users when they log in.";
12091209+ };
12021210 };
120312111204121212051213 ###### implementation
1206121412071215 config = {
12161216+ assertions = [
12171217+ {
12181218+ assertion = isNull config.users.motd || isNull config.users.motdFile;
12191219+ message = ''
12201220+ Only one of users.motd and users.motdFile can be set.
12211221+ '';
12221222+ }
12231223+ ];
1208122412091225 environment.systemPackages =
12101226 # Include the PAM modules in the system path mostly for the manpages.