Files
dendritic/modules/nixos/login-text.nix
2026-03-16 08:27:09 -05:00

46 lines
931 B
Nix

{ inputs, ... }: {
flake.modules.nixos.login-text = { config, ... }: {
programs.rust-motd = {
enable = true;
refreshInterval = "*:0/5";
order = [
"global"
"last_login"
"service_status"
# "uptime"
"memory"
"filesystems"
];
settings = {
global = {
time_format = "%Y-%m-%d %H:%M:%S %Z";
};
last_login = {
john = 3;
root = 3;
};
service_status = {
Docker = "docker";
SSH = "sshd.socket";
"SSH Cert Renewal" = "step-ssh-host-renew.timer";
"mTLS Renewal" = "mtls-renew.timer";
};
# This calculation is wrong for LXCs
# uptime = {
# prefix = "Uptime";
# };
memory = {
swap_pos = "beside";
};
filesystems = {
root = "/";
};
};
};
};
}