mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-01-03 07:41:58 +00:00
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
9 lines
549 B
Nu
9 lines
549 B
Nu
export def main [] {
|
|
{
|
|
"kernel": $nu.os-info.kernel_version,
|
|
"nu": $env.NU_VERSION,
|
|
"packages": (ls /etc/profiles/per-user | select name | prepend [[name];["/run/current-system/sw"]] | each { insert "number" (nix path-info --recursive ($in | get name) | lines | length) | insert "size" ( nix path-info -S ($in | get name) | parse -r '\s(.*)' | get capture0.0 | into filesize) | update "name" ($in | get name | parse -r '.*/(.*)' | get capture0.0 | if $in == "sw" {"system"} else {$in}) | rename "environment"}),
|
|
"uptime": (sys host).uptime
|
|
}
|
|
}
|