Add flake

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-08-04 10:32:18 +02:00
parent 298474b29a
commit 029932873a
4 changed files with 135 additions and 0 deletions

33
flake.nix Executable file
View File

@@ -0,0 +1,33 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs:
(
let
system = "x86_64-linux";
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
in
{
devShells.${system}.default = pkgs.mkShell { packages = with pkgs; [ hugo ]; };
formatter.${system} = treefmt.config.build.wrapper;
checks.formatting.${system} = treefmt.config.build.check inputs.self;
}
);
}