{ description = "Blog von Jan Kremer"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; treefmt = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, systems, treefmt, ... }: let eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); treefmtEval = eachSystem (pkgs: treefmt.lib.evalModule pkgs ./treefmt.nix); in { devShells = eachSystem (pkgs: { default = pkgs.mkShell { name = "Zola website"; buildInputs = with pkgs; [ zola vscode-langservers-extracted ]; }; }); formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper); checks = eachSystem (pkgs: { formatting = treefmtEval.${pkgs.system}.config.build.check self; zola = pkgs.runCommand "zola-check" { buildInputs = [ pkgs.zola ]; } '' cp -r ${self}/. . zola check touch $out ''; }); apps = eachSystem (pkgs: { default = { type = "app"; meta = { description = "Build website"; homepage = "https://jankremer.de"; license = nixpkgs.lib.licenses.cc0; }; program = (pkgs.writeShellScript "build-website" '' set -e ${pkgs.zola}/bin/zola build --minify '').outPath; }; }); }; }