Flake: Add and run formatter + Rename devshell

Add a formatter output to the flake (`nix fmt`), along with moving +
renaming the devshell so it will work by running `nix-shell` in the root
of the project.
This commit is contained in:
Jess
2024-12-15 03:53:07 +13:00
committed by Sam Atkins
parent 6969d1eba3
commit 61fcccb104
4 changed files with 50 additions and 34 deletions

View File

@@ -3,12 +3,24 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils, }: utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs { inherit system; };
in {
devShells.default = import ./UI { inherit pkgs; };
});
outputs =
{
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = import ./shell.nix { inherit pkgs; };
formatter = pkgs.nixfmt-rfc-style;
}
);
}