From 6c0f69230d499e683d21dee452816d061d7aa6a4 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 29 Aug 2025 19:27:33 +0200 Subject: [PATCH] nixos/rust-motd: fix conf After the package got upgraded to 2.0, this failed with `.conf` as extension. For now, I'm disabling the legacy warning, because that's an issue the maintainer (i.e. me) needs to solve at some point rather than the folks using the module. --- nixos/modules/programs/rust-motd.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/programs/rust-motd.nix b/nixos/modules/programs/rust-motd.nix index 8d1eb4a7e5bf..994b5a61fb66 100644 --- a/nixos/modules/programs/rust-motd.nix +++ b/nixos/modules/programs/rust-motd.nix @@ -12,7 +12,7 @@ let # Order the sections in the TOML according to the order of sections # in `cfg.order`. motdConf = - pkgs.runCommand "motd.conf" + pkgs.runCommand "motd.toml" { __structuredAttrs = true; inherit (cfg) order settings; @@ -154,6 +154,8 @@ in security.pam.services.sshd.showMotd = lib.mkIf cfg.enableMotdInSSHD true; users.motdFile = lib.mkIf cfg.enableMotdInSSHD "/var/lib/rust-motd/motd"; + programs.rust-motd.settings.global.show_legacy_warning = false; + services.openssh.extraConfig = lib.mkIf (cfg.settings ? last_login && cfg.settings.last_login != { }) ''