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

27
flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1739736696,
"narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

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";
};
});
};
}