feat: add flake devshell

This commit is contained in:
Vri 🌈 2025-02-18 19:52:22 +01:00
parent 62b7cf9324
commit c04e4ae6c5
Signed by: vrifox
SSH key fingerprint: SHA256:7OLOvW+jmULkXpdl5rUWgid7WJQhOIEgj+4WP/PtCpI
2 changed files with 61 additions and 0 deletions

34
flake.nix Normal file
View 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";
};
});
};
}