feat(console): Add motd with system info

This commit is contained in:
Tom Hubrecht 2024-07-30 10:36:17 +02:00
parent 2cb6c24535
commit e0cec882d8
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc

View file

@ -36,16 +36,20 @@ in
environment.variables.EDITOR = "nvim";
programs.neovim.vimAlias = true;
programs = {
neovim.vimAlias = true;
rust-motd = {
enable = true;
system.activationScripts.diff = {
supportsDryActivation = true;
text = ''
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
'';
settings = {
uptime.prefix = "Up";
filesystems.root = "/";
memory.swap_pos = "below";
last_login.root = 5;
};
};
programs.bash.promptInit = ''
bash.promptInit = ''
FQDN="$(hostname).$(domainname)"
# Provide a nice prompt if the terminal supports it.
if [ "$TERM" != "dumb" ] || [ -n "$INSIDE_EMACS" ]; then
@ -62,6 +66,14 @@ in
fi
fi
'';
};
system.activationScripts.diff = {
supportsDryActivation = true;
text = ''
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
'';
};
hardware.enableRedistributableFirmware = true;