Added nushell updates

This commit is contained in:
2026-02-13 14:11:15 +00:00
parent dbe307daa8
commit 845f148529
3 changed files with 10 additions and 1 deletions

View File

@@ -18,10 +18,14 @@
enable = true;
package = pkgStream.nushell;
plugins = with pkgStream.nushellPlugins; [
bson
desktop_notifications
formats
gstat
highlight
polars
query
semver
];
extraConfig = ''
source ~/.config/nushell/my_config/config.nu

View File

@@ -138,6 +138,11 @@
stateVersion = "23.11"; # Did you read the comment?
autoUpgrade.enable = true;
autoUpgrade.dates = "weekly";
activationScripts.diff = ''
if [[ -e /run/current-system ]]; then
${pkgs.nushell}/bin/nu -c "let diff_closure = (${pkgs.nix}/bin/nix store diff-closures /run/current-system '$systemConfig'); let table = (\$diff_closure | lines | where \$it =~ KiB | where \$it =~ | parse -r '^(?<Package>\S+): (?<Old>[^,]+)(?:.*) (?<New>[^,]+)(?:.*), (?<DiffBin>.*)$' | insert Diff { get DiffBin | ansi strip | into filesize } | sort-by -r Diff | reject DiffBin); if (\$table | get Diff | is-not-empty) { print \"\"; \$table | append [[Package Old New Diff]; [\"\" \"\" \"\" \"\"]] | append [[Package Old New Diff]; [\"\" \"\" \"Total:\" (\$table | get Diff | math sum) ]] | print; print \"\" }"
fi
'';
};
# Set user config settings