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
|
# 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
|
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
|
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
|
# Static folder changed, re-run Hugo
|
||||||
hugo $hugoFlags --config=config.toml,config-gen.toml
|
hugo $hugoFlags --config=config.toml,config-gen.toml
|
||||||
|
|
61
flake.lock
61
flake.lock
|
@ -3,11 +3,11 @@
|
||||||
"blog-source": {
|
"blog-source": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672635175,
|
"lastModified": 1676848263,
|
||||||
"narHash": "sha256-TBcchhkWjpGNVU5W1AWqYFOPzB2ejNsAqF8pM2vB4Ac=",
|
"narHash": "sha256-OZY1eueOqibJck7IrFsc1flQ2mb6FRA6gEPkg0cUvhQ=",
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
"rev": "5c62107e3bb0ef0f126d5d6adf532a7187884687",
|
"rev": "d003fdf35751386fa69e5011febfcdb7a1629e15",
|
||||||
"revCount": 619,
|
"revCount": 627,
|
||||||
"submodules": true,
|
"submodules": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git"
|
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git"
|
||||||
|
@ -63,6 +63,21 @@
|
||||||
"type": "github"
|
"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": {
|
"katex-html": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
|
@ -147,12 +162,48 @@
|
||||||
"type": "github"
|
"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": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"blog-source": "blog-source",
|
"blog-source": "blog-source",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"katex-html": "katex-html",
|
"katex-html": "katex-html",
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"resume": "resume"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs";
|
nixpkgs.url = "github:nixos/nixpkgs";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
katex-html.url = "git+https://dev.danilafe.com/Nix-Configs/katex-html";
|
katex-html.url = "git+https://dev.danilafe.com/Nix-Configs/katex-html";
|
||||||
|
resume.url = "git+https://dev.danilafe.com/DanilaFe/resume";
|
||||||
blog-source = {
|
blog-source = {
|
||||||
flake = false;
|
flake = false;
|
||||||
url = "https://dev.danilafe.com/Web-Projects/blog-static.git";
|
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
|
let
|
||||||
buildersFor = system: import ./lib.nix {
|
buildersFor = system: import ./lib.nix {
|
||||||
inherit blog-source;
|
inherit blog-source;
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
katex-html = katex-html.defaultPackage.${system};
|
katex-html = katex-html.defaultPackage.${system};
|
||||||
|
resume = resume.defaultPackage.${system};
|
||||||
};
|
};
|
||||||
in
|
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 pkgs;
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -7,6 +7,7 @@ let
|
||||||
protocol = ssl: if ssl then "https://" else "http://";
|
protocol = ssl: if ssl then "https://" else "http://";
|
||||||
website = settings: stdenv.mkDerivation {
|
website = settings: stdenv.mkDerivation {
|
||||||
inherit (settings) src ssl host;
|
inherit (settings) src ssl host;
|
||||||
|
inherit resume;
|
||||||
name = "blog-static";
|
name = "blog-static";
|
||||||
version = settings.src.rev or "dirty";
|
version = settings.src.rev or "dirty";
|
||||||
publicPath = settings.path;
|
publicPath = settings.path;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user