Build resume using nix derivation
This commit is contained in:
parent
1b7cf307db
commit
d065ca364e
|
@ -15,6 +15,7 @@ hugo $hugoFlags --config=config.toml,config-gen.toml
|
|||
# Can't do submodules because nix flake inputs get their .git deleted
|
||||
mkdir -p static/graph && ruby ./analyze.rb > static/graph/graph.gen.js # Graph files
|
||||
stork build --input public/index.toml --output static/index.st # Search index
|
||||
cp $resume/Resume-Danila-Fedorin.pdf static/Resume-Danila-Fedorin.pdf
|
||||
|
||||
# Static folder changed, re-run Hugo
|
||||
hugo $hugoFlags --config=config.toml,config-gen.toml
|
||||
|
|
61
flake.lock
61
flake.lock
|
@ -3,11 +3,11 @@
|
|||
"blog-source": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1672635175,
|
||||
"narHash": "sha256-TBcchhkWjpGNVU5W1AWqYFOPzB2ejNsAqF8pM2vB4Ac=",
|
||||
"lastModified": 1676848263,
|
||||
"narHash": "sha256-OZY1eueOqibJck7IrFsc1flQ2mb6FRA6gEPkg0cUvhQ=",
|
||||
"ref": "master",
|
||||
"rev": "5c62107e3bb0ef0f126d5d6adf532a7187884687",
|
||||
"revCount": 619,
|
||||
"rev": "d003fdf35751386fa69e5011febfcdb7a1629e15",
|
||||
"revCount": 627,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git"
|
||||
|
@ -63,6 +63,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"locked": {
|
||||
"lastModified": 1676283394,
|
||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"katex-html": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
|
@ -147,12 +162,48 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1676718858,
|
||||
"narHash": "sha256-giQecvcifVLNHCC9lMfTGP09tNxXhOMw+d/aql7MhRw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e6d5772f3515b8518d50122471381feae7cbae36",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"resume": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1676871379,
|
||||
"narHash": "sha256-b9QCL1/0/cpIgv5tXXZV+osOSDA3YVKbOuBJfq+JAUg=",
|
||||
"ref": "master",
|
||||
"rev": "984256a0faa5c44ec01f76864fbcb9420f129788",
|
||||
"revCount": 43,
|
||||
"type": "git",
|
||||
"url": "https://dev.danilafe.com/DanilaFe/resume"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://dev.danilafe.com/DanilaFe/resume"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"blog-source": "blog-source",
|
||||
"flake-utils": "flake-utils",
|
||||
"katex-html": "katex-html",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"resume": "resume"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
katex-html.url = "git+https://dev.danilafe.com/Nix-Configs/katex-html";
|
||||
resume.url = "git+https://dev.danilafe.com/DanilaFe/resume";
|
||||
blog-source = {
|
||||
flake = false;
|
||||
url = "https://dev.danilafe.com/Web-Projects/blog-static.git";
|
||||
|
@ -11,12 +12,13 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, blog-source, nixpkgs, flake-utils, katex-html }:
|
||||
outputs = { self, blog-source, nixpkgs, flake-utils, katex-html, resume }:
|
||||
let
|
||||
buildersFor = system: import ./lib.nix {
|
||||
inherit blog-source;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
katex-html = katex-html.defaultPackage.${system};
|
||||
resume = resume.defaultPackage.${system};
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
3
lib.nix
3
lib.nix
|
@ -1,4 +1,4 @@
|
|||
{ blog-source, pkgs, katex-html }:
|
||||
{ blog-source, pkgs, katex-html, resume }:
|
||||
|
||||
with pkgs;
|
||||
with lib;
|
||||
|
@ -7,6 +7,7 @@ let
|
|||
protocol = ssl: if ssl then "https://" else "http://";
|
||||
website = settings: stdenv.mkDerivation {
|
||||
inherit (settings) src ssl host;
|
||||
inherit resume;
|
||||
name = "blog-static";
|
||||
version = settings.src.rev or "dirty";
|
||||
publicPath = settings.path;
|
||||
|
|
Loading…
Reference in New Issue
Block a user