This repository was archived by the owner on Nov 7, 2024. It is now read-only.

Description
I feel like this is a bit of a hack,
https://github.com/srid/nix-health/blob/0c4735b6403a4fd13ef170f3c21296e05cd32fe5/flake.nix#L21
packages.default = pkgs.nuenv.mkScript {
name = "nix-health";
script = ''
${lib.getExe pkgs.nushell} ${./nix-health.nu} ${system}
'';
}
nix-health.nu references the system variable, so I'm passing it as a command-line argument. Also, I have to manually pull in pkgs.nushell to invoke the script. Is there a more idiomatic way of achieving this? The main goal is to put the script body in a separate file, whilst still being able to reference Nix variables in scope.