Initial commit.
This commit is contained in:
commit
1cb056db47
8 changed files with 294 additions and 0 deletions
38
flake.nix
Normal file
38
flake.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
description = "Annotated Annals: A blog";
|
||||
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs.flake-utils.inputs.nxipkgs.follows = "nixpkgs";
|
||||
inputs.hermit-zola = { url = "github:VersBinarii/hermit_zola"; flake = false; };
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, hermit-zola }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
themeName = "hermit_zola";
|
||||
in
|
||||
{
|
||||
packages.blog = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "annotated-annals";
|
||||
version = "2022-08-28";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ pkgs.zola ];
|
||||
configurePhase = ''
|
||||
mkdir -p "themes/${themeName}"
|
||||
cp -r ${hermit-zola}/* "themes/${themeName}"
|
||||
'';
|
||||
buildPhase = "zola build";
|
||||
installPhase = "cp -r public $out";
|
||||
};
|
||||
|
||||
defaultPackage = self.packages.${system}.blog;
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
packages = [ pkgs.zola ];
|
||||
shellHook = ''
|
||||
ln -sn "${hermit-zola}" "themes/${themeName}"
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue