Closed srid closed 1 year ago
This,
fmt = { exec = "${lib.getExe pkgs.nixpkgs-fmt} ./*.nix"; flakeApp = true; };
... would wire a flake app of the same name, so that nix run .#fmt will work (in addition to nix develop -c , fmt).
nix run .#fmt
nix develop -c , fmt
Useful in https://github.com/srid/nixos-config for running activation without entering the devShell. Useful for users who do not use direnv, as well.
cc @marijanp
flakeApp cannot be true by default, because it does not make sense for many scripts (ghcid, for instance, can only be run in a devshell).
flakeApp
Closing in favour of #23
This,
... would wire a flake app of the same name, so that
nix run .#fmt
will work (in addition tonix develop -c , fmt
).Useful in https://github.com/srid/nixos-config for running activation without entering the devShell. Useful for users who do not use direnv, as well.
cc @marijanp