diff --git a/.config/nushell/conf.d/99-attic.nu b/.config/nushell/conf.d/99-attic.nu new file mode 100644 index 0000000..4494122 --- /dev/null +++ b/.config/nushell/conf.d/99-attic.nu @@ -0,0 +1,14 @@ +def "attic bpush" [ + cache:string, # The Attic cache to push to + flake:string, # The flake reference to build + ...nixargs:string, # Extra arguments for Nix + --nom(-n), # Use Nom +] { + let outpath = (^(if $nom { "nom" } else { "nix" }) + build + --no-link + --print-out-paths + $flake + ...$nixargs) + attic push $cache $outpath +} diff --git a/.config/nushell/conf.d/99-udisks.nu b/.config/nushell/conf.d/99-udisks.nu index 90936b7..116e128 100644 --- a/.config/nushell/conf.d/99-udisks.nu +++ b/.config/nushell/conf.d/99-udisks.nu @@ -8,7 +8,7 @@ def "udisksctl lockumount" [--block-device (-b): path] { # This is borked on the udisksctl side #udisksctl unmount -p $plain_dev - (dbus call --system + (dbus call --system --timeout 356day --dest org.freedesktop.UDisks2 $plain_dev org.freedesktop.UDisks2.Filesystem diff --git a/nix/nushell-plugins.nix b/nix/nushell-plugins.nix index ce7dfb4..8bfffd1 100644 --- a/nix/nushell-plugins.nix +++ b/nix/nushell-plugins.nix @@ -1,13 +1,17 @@ { config, lib, pkgs, ... }: +let + nu-ver = "0.95.0"; +in { options.nushell-plugins = lib.mkOption { }; config.nushell-plugins = [ - (pkgs.rustPlatform.buildRustPackage { + (pkgs.rustPlatform.buildRustPackage rec { name = "nu-plugin-dbus"; + version = "0.8.0"; src = pkgs.fetchCrate { + inherit version; pname = "nu_plugin_dbus"; - version = "0.8.0"; hash = "sha256-Ogc4iw0LIDoxyQnoTXzbNaQ6jHtkjmWja/a3TB1TZjk="; }; @@ -16,21 +20,23 @@ nativeBuildInputs = with pkgs; [ pkg-config ]; buildInputs = with pkgs; [ dbus ]; }) - (pkgs.rustPlatform.buildRustPackage { + (pkgs.rustPlatform.buildRustPackage rec { name = "nu-plugin-formats"; + version = nu-ver; src = pkgs.fetchCrate { + inherit version; pname = "nu_plugin_formats"; - version = "0.95.0"; hash = "sha256-nwfLQxVzzUfBn7m1F669NThqzG9bAXlM/lCAVGDKY8o="; }; cargoSha256 = "sha256-e8VcSJYH5P4LR1bFbmeiiF+fSfRlqTEzfnkPtUFmB2I="; }) - (pkgs.rustPlatform.buildRustPackage { + (pkgs.rustPlatform.buildRustPackage rec { name = "nu-plugin-polars"; + version = nu-ver; src = pkgs.fetchCrate { + inherit version; pname = "nu_plugin_polars"; - version = "0.95.0"; hash = "sha256-d2giFOByeX/lLc6k3e4cf/RodwV2yLjqeZD+cmVIwK8="; }; @@ -38,6 +44,17 @@ doCheck = false; # Needs OpenSSL, which build doesn't for some reason. }) + (pkgs.rustPlatform.buildRustPackage rec { + name = "nu-plugin-query"; + version = nu-ver; + src = pkgs.fetchCrate { + inherit version; + pname = "nu_plugin_query"; + hash = "sha256-3lWBqP3ZeHsQApvZmvAsVgseZWrIPDfgm+lZxkDO1JE="; + }; + + cargoSha256 = "sha256-BOAzv7N9UfIxIA0YGYLc/DfU5VSowYtxe6UYZjQ/rf4="; + }) ]; config.output.packages.nushell-plugins =