Simplify `flake.nix` and `.gitignore`.
parent
21dab012ba
commit
abfa7ef836
|
@ -0,0 +1,6 @@
|
||||||
|
.direnv
|
||||||
|
result
|
||||||
|
notes/.obsidian.mobile
|
||||||
|
notes/.obsidian/appearance.json
|
||||||
|
notes/.obsidian/hotkeys.json
|
||||||
|
notes/.obsidian/workspace.json
|
14
flake.nix
14
flake.nix
|
@ -18,14 +18,16 @@
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
quartz = pkgs.fetchFromGitHub {
|
quartz = rec {
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "jrpotter";
|
owner = "jrpotter";
|
||||||
repo = "quartz";
|
repo = "quartz";
|
||||||
rev = "8c126e9d21cd0bc90da5f78677d458fc81892af1";
|
rev = "8c126e9d21cd0bc90da5f78677d458fc81892af1";
|
||||||
hash = "sha256-caB9F5lvroQ+ZcvzKW8RnKfzSHjEiYfZUSqZiuaggVs=";
|
hash = "sha256-caB9F5lvroQ+ZcvzKW8RnKfzSHjEiYfZUSqZiuaggVs=";
|
||||||
};
|
};
|
||||||
|
nodeDependencies = (pkgs.callPackage "${src}/default.nix" {}).nodeDependencies;
|
||||||
|
};
|
||||||
|
|
||||||
nodeDependencies = (pkgs.callPackage "${quartz}/default.nix" {}).nodeDependencies;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = {
|
packages = {
|
||||||
|
@ -37,13 +39,13 @@
|
||||||
nativeBuildInputs = [ pkgs.nodejs ];
|
nativeBuildInputs = [ pkgs.nodejs ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cp -r ${quartz} quartz
|
cp -r ${quartz.src} 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 ${nodeDependencies}/lib/node_modules ./node_modules
|
ln -s ${quartz.nodeDependencies}/lib/node_modules ./node_modules
|
||||||
export PATH="${nodeDependencies}/bin:$PATH"
|
export PATH="${quartz.nodeDependencies}/bin:$PATH"
|
||||||
|
|
||||||
rm -r content
|
rm -r content
|
||||||
cp -r ${./notes} content
|
cp -r ${./notes} content
|
||||||
|
@ -55,7 +57,7 @@
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp -r public $out
|
cp -r public $out/share
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue