feat: add flake devshell
This commit is contained in:
parent
62b7cf9324
commit
c04e4ae6c5
2 changed files with 61 additions and 0 deletions
34
flake.nix
Normal file
34
flake.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
self,
|
||||
}: let
|
||||
pkgs = nixpkgs;
|
||||
|
||||
mkAllSystems = genAttrs [
|
||||
"aarch64-darwin"
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-darwin"
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
inherit (lib) genAttrs;
|
||||
inherit (pkgs) alejandra lib;
|
||||
in {
|
||||
formatter = mkAllSystems (system: alejandra);
|
||||
|
||||
devShells = mkAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
inherit (pkgs) mkShell;
|
||||
in {
|
||||
default = mkShell {
|
||||
nativeBuildInputs = [pkgs.hugo];
|
||||
shellHook = "hugo server";
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue