Compare commits

...

2 Commits

Author SHA1 Message Date
f1a8dd4f53 Bump to a more recent version of NixOS
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2025-12-26 22:28:38 +00:00
2770fd03eb Fix chromium PDF generation in newer versions
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2025-12-26 22:28:10 +00:00
3 changed files with 21 additions and 6 deletions

View File

@@ -13,4 +13,19 @@ mkdir $out
cp resume.html $out
mkdir $out/css && cp ./css/style.css $out/css
chromium --disable-gpu --headless --print-to-pdf="$out/Resume-Danila-Fedorin.pdf" file://$(pwd)/resume.html
# ChatGPT-provided solution to Chrome having trouble
# setting up the network service due to a lack
# of readable files.
tmp="$(mktemp -d)"
mkdir -p "$tmp"/{config,cache,profile}
HOME="$tmp" \
XDG_CONFIG_HOME="$tmp/config" \
XDG_CACHE_HOME="$tmp/cache" \
chromium \
--headless \
--disable-gpu \
--user-data-dir="$tmp/profile" \
--disable-dev-shm-usage \
--print-to-pdf="$out/Resume-Danila-Fedorin.pdf" \
"file://$(pwd)/resume.html"

8
flake.lock generated
View File

@@ -20,16 +20,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1688392541,
"narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=",
"lastModified": 1766736597,
"narHash": "sha256-BASnpCLodmgiVn0M1MU2Pqyoz0aHwar/0qLkp7CjvSQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b",
"rev": "f560ccec6b1116b22e6ed15f4c510997d99d5852",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-22.11",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}

View File

@@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
};