mirror of https://gitlab.crans.org/nounous/nixos
Merge branch 'motd' into 'main'
Draft: motd See merge request nounous/nixos!46merge-requests/46/merge
commit
c481ad244f
|
|
@ -14,6 +14,7 @@ in
|
|||
./ntp.nix
|
||||
./restic_client.nix
|
||||
./monitoring.nix
|
||||
./motd.nix
|
||||
./nullmailer.nix
|
||||
./packages.nix
|
||||
./ssh.nix
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
Loading…
Reference in New Issue