mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
rm modules/status-on-console.nix
This commit is contained in:
parent
a06d2e3913
commit
1aacc1726c
1 changed files with 0 additions and 39 deletions
|
@ -1,39 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.sconfig.status-on-console;
|
|
||||||
|
|
||||||
ncfg = pkgs.writeText "neofetch.conf" ''
|
|
||||||
print_info() {
|
|
||||||
info title
|
|
||||||
info underline
|
|
||||||
|
|
||||||
info "OS" distro
|
|
||||||
info "Host" model
|
|
||||||
info "Kernel" kernel
|
|
||||||
info "Uptime" uptime
|
|
||||||
info "CPU" cpu
|
|
||||||
info "Memory" memory
|
|
||||||
info "Disk" disk
|
|
||||||
info "Local IP" local_ip
|
|
||||||
|
|
||||||
info cols
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
nscript = pkgs.writeShellScript "neofetch-wrapped" ''
|
|
||||||
export PATH="$PATH:/run/current-system/sw/bin"
|
|
||||||
(
|
|
||||||
${pkgs.neofetch}/bin/neofetch --config "${ncfg}"
|
|
||||||
echo '\l'
|
|
||||||
) >/run/issue
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.sconfig.status-on-console = lib.mkEnableOption "Display Neofetch on system console";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg {
|
|
||||||
environment.etc.issue.source = pkgs.lib.mkForce "/run/issue";
|
|
||||||
systemd.services."getty@".serviceConfig.ExecStartPre = "-${nscript}";
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue