feat(console): Add motd with system info
This commit is contained in:
parent
2cb6c24535
commit
e0cec882d8
1 changed files with 31 additions and 19 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue