build site via zola
This commit is contained in:
parent
0ebd2218fd
commit
beccccb61f
11 changed files with 199 additions and 48 deletions
30
flake.nix
Normal file
30
flake.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
# from https://ilanjoselevich.com/blog/building-websites-using-nix-flakes-and-zola/
|
||||
description = "the website for astolfo.org";
|
||||
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
packages.website = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "astolfo.org";
|
||||
version = "1.0";
|
||||
src = ./src;
|
||||
nativeBuildInputs = [ pkgs.zola ];
|
||||
buildPhase = "zola build";
|
||||
installPhase = "cp -r public $out";
|
||||
};
|
||||
defaultPackage = self.packages.${system}.website;
|
||||
devShell = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
zola
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue