Merge branch 'motd' into 'main'

Draft: motd

See merge request nounous/nixos!46
merge-requests/46/merge
lzebulon 2026-01-01 03:22:01 +01:00
commit c481ad244f
2 changed files with 37 additions and 0 deletions

View File

@ -14,6 +14,7 @@ in
./ntp.nix
./restic_client.nix
./monitoring.nix
./motd.nix
./nullmailer.nix
./packages.nix
./ssh.nix

View File

@ -0,0 +1,36 @@
{ config, lib, pkgs, ... }:
let
phrase = v: if v.cond then ''[0m> [38;5;82m${v.name}[0m a été déployé sur cette machine. \n'' else "";
importantPackages = [
{
name = "Collabora";
cond = config.services.collabora-online.enable;
}
{
name = "Jitsi";
cond = config.services.jitsi-meet.enable;
}
{
name = "NextCloud";
cond = config.services.nextcloud.enable;
}
{
name = "NGINX";
cond = config.services.nginx.enable;
}
{
name = "Restic (Client)";
cond = config.crans.resticClient.enable;
}
{
name = "Restic (Server)";
cond = config.crans.services.resticServer.enable;
}
];
in
{
users.motd = ''
${config.networking.hostName} utilise NixOS ${lib.version} \n
''
+ lib.concatStringsSep "\n" (map phrase importantPackages);
}