Migrate content to notes and override quartz.

pull/2/head
Joshua Potter 2024-02-01 07:49:42 -07:00
parent 7b93f02375
commit 21dab012ba
22 changed files with 17 additions and 14 deletions

View File

@ -1 +0,0 @@
{}

View File

@ -18,15 +18,14 @@
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
quartz = { quartz = pkgs.fetchFromGitHub {
src = pkgs.fetchFromGitHub { owner = "jrpotter";
owner = "jrpotter"; repo = "quartz";
repo = "quartz"; rev = "8c126e9d21cd0bc90da5f78677d458fc81892af1";
rev = "e2e1053fd45586c19829be224008673b17111e6b"; hash = "sha256-caB9F5lvroQ+ZcvzKW8RnKfzSHjEiYfZUSqZiuaggVs=";
hash = pkgs.lib.fakeHash;
};
nodeDependencies = (pkgs.callPackage ./quartz {}).nodeDependencies;
}; };
nodeDependencies = (pkgs.callPackage "${quartz}/default.nix" {}).nodeDependencies;
in in
{ {
packages = { packages = {
@ -38,20 +37,25 @@
nativeBuildInputs = [ pkgs.nodejs ]; nativeBuildInputs = [ pkgs.nodejs ];
buildPhase = '' buildPhase = ''
cp -r ${quartz.src} quartz cp -r ${quartz} quartz
cd quartz cd quartz
find -type f -execdir chmod 644 {} + find -type f -execdir chmod 644 {} +
find -type d -execdir chmod 755 {} + find -type d -execdir chmod 755 {} +
ln -s ${quartz.nodeDependencies}/lib/node_modules ./node_modules ln -s ${nodeDependencies}/lib/node_modules ./node_modules
export PATH="${quartz.nodeDependencies}/bin:$PATH" export PATH="${nodeDependencies}/bin:$PATH"
# export npm_config_cache=$PWD rm -r content
# npx quartz build cp -r ${./notes} content
cp ${./quartz.config.ts} quartz.config.ts
cp ${./quartz.layout.ts} quartz.layout.ts
node quartz/bootstrap-cli.mjs build
''; '';
installPhase = '' installPhase = ''
mkdir $out mkdir $out
cp -r public $out
''; '';
}; };