mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
add "status-on-console" module
This commit is contained in:
parent
abd104a762
commit
1fa12a96e8
1 changed files with 39 additions and 0 deletions
39
modules/status-on-console/default.nix
Normal file
39
modules/status-on-console/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
ncfg = pkgs.writeText "neofetch.conf" ''
|
||||||
|
print_info() {
|
||||||
|
info title
|
||||||
|
info underline
|
||||||
|
|
||||||
|
info "OS" distro
|
||||||
|
info "Host" model
|
||||||
|
info "Kernel" kernel
|
||||||
|
info "Uptime" uptime
|
||||||
|
info "Packages" packages
|
||||||
|
info "Shell" shell
|
||||||
|
info "Resolution" resolution
|
||||||
|
info "CPU" cpu
|
||||||
|
info "GPU" gpu
|
||||||
|
info "Memory" memory
|
||||||
|
info "Disk" disk
|
||||||
|
info "Local IP" local_ip
|
||||||
|
# info "Public IP" public_ip
|
||||||
|
info "Users" users
|
||||||
|
|
||||||
|
info cols
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
nscript = pkgs.writeShellScript "neofetch-wrapped" ''
|
||||||
|
export PATH="$PATH:${pkgs.iproute}/bin:${pkgs.gawk}/bin"
|
||||||
|
(
|
||||||
|
${pkgs.neofetch}/bin/neofetch --config "${ncfg}"
|
||||||
|
echo '\l'
|
||||||
|
) >/run/issue
|
||||||
|
'';
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
environment.etc.issue.source = pkgs.lib.mkForce "/run/issue";
|
||||||
|
systemd.services."getty@".serviceConfig.ExecStartPre = nscript;
|
||||||
|
}
|
Loading…
Reference in a new issue