Code Monkey home page Code Monkey logo

resume.nix's Introduction

resume.nix

Reproducible personal résumé built & deployed using Nix and jsonresume. Supports a broad number of themes.

Getting started

  • TODO: Create template

Create your own resume repository and run

nix flake init -t github:Lehmanator/resume.nix

to clone the template to use this flake.

Template will come with a builder package, and a selection of theme packages that are passed to the builder. To build your résumé, first edit the data inside src/resume.nix, then select one of the packages to build.

Each theme will have one of the following packages:

  • Theme Package: jsonresume-theme-THEMENAME
  • HTML Builder: jsonresume-html-THEMENAME
  • PDF Builder: jsonresume-pdf-THEMENAME

For example, to build a PDF document of your résumé, run:

`nix build .#jsonresume-pdf-THEMENAME`

Or to build the HTML static site, run:

`nix build .#jsonresume-html-THEMENAME`

You will then find either resume.pdf or index.html inside ./result directory.

Provided is a default package using a pre-selected theme. This makes building as simple as running: nix build with no extra arguments. To change which theme is used, edit the default package in flake.nix to point to some other config.packages.jsonresume-theme-THEMENAME package.

Included are package definitions for other utils, themes, etc. These may not all be complete or functioning for the time-being.

To list all available packages, run:

nix flake show github:Lehmanator/resume.nix

More Themes

Check NPM for other themes. Most should be fairly trivial to include, and can mostly be copy-and-pasted from other theme package files in packages/jsonresume-themes/THEMENAME

Search NPM packages for jsonresume themes

To-Do

List of features I'd like to implement at some point. Plz help me. Contributions welcome!

  • GitHub/GitLab Pages deployment
  • GitHub/GitLab Releases deployment
  • Formatters via treefmt-nix
  • QR code links to your HTML deployments or PDF release artifacts.
  • Co-existing theme deployments.
  • Markdown conversion
  • .vcard conversion
  • 'Download as...' button
  • LaTeX support
  • flake checks
  • PDF signing
  • More themes!

Nix Environments

  • devShell for building, hacking on themes, etc.
  • hmModules.jsonresume implementing home-manager options to allow setting your data as a part of your homeConfigurations
  • nixosModules.jsonresume implementing NixOS options to allow deploying your static site & hosting your assets on your machine's networking.domain via a webserver running as a systemd service by declaring what to deploy in your nixosConfigurations.
    • TLS certificate generation for self-hosting your static site resume.
    • DNS configuration to point your domain at GitHub Pages.

Personal Info

  • Actually make the data accurate.

Links for later

Thanks

  • TaserudConsulting/jsonresume-nix - Flake repo I originally forked this one from. Consider using that project if it better fits your needs. My repo has diverged substantially.
  • rbardini/resumed - Util that builds the index.html artifacts.
  • JarvusInnovations/puppeteer-cli - Util that builds the resume.pdf artifacts from index.html
  • All the jsonresume maintainers, theme developers, and community.

resume.nix's People

Contributors

lehmanator avatar etu avatar dependabot[bot] avatar github-actions[bot] avatar anthonyroussel avatar frogamic avatar

Stargazers

Oleg Pykhalov avatar  avatar

Watchers

 avatar  avatar

resume.nix's Issues

`jsonresume` PDF doesn't generate correctly inside Nix sandbox.

Problem

PDF generation is broken for all current themes inside the Nix sandbox.

End result is that a fully-automated CI/CD process for PDF generation & deployment will build a faulty PDF.

All themes linking remote resources in the HTML will be incorrect in some way, but current themes are completely unreadable.

Cause

Nix sandbox prevents fetching external assets from the internet.

All current themes link to CDN assets for things like bootstrap, font-awesome, other CSS, etc.

The puppeteer-cli PDF generation command: puppeteer print ./index.html resume.pdf tries to render the HTML document in a headless Chromium instance, which cannot reach the assets required by the HTML.

Potential solutions

Prefetch external assets and specify their hash of fixed-output derivation.

Cons:

  • Each change to JSON data will require changing the hash of the derivation output
  • Breaks ability to rapidly iterate on resume data using nix build.

Pros:

  • No patching theme packages.
  • No rewriting HTML to remove external links

Call nix build with --impure` arg in CI workflow.

TODO: How to allow internet inside build sandbox?

Cons:

  • Adds impurity to builds
  • packages.jsonresume-pdf* packages cannot be built in pure nix build

Pros:

  • Minimal changes to build process.

Build PDF in separate GitHub Actions workflow

Only build the HTML in the CI workflow.
Create second workflow for running PDF generation.
Run workflow upon GitHub pages deployment.
Call puppeteer-cli on GitHub pages URL instead of HTML file.

Cons:

  • Requires separate GitHub Actions workflow.
  • New GA workflow depends on successful GitHub pages deployment to update the data.
  • May create extra releases for no-op changes if GitHub pages deployment doesn't successfully update with new HTML.
  • Requires immediate usage of GitHub releases & new associated GA workflow.
  • PDF links cannot be relative dirs to Git repo assets, must link to GitHub releases.
  • Nix workflow and GA workflows will now diverge.

Pros:

  • Minimal changes within Nix build process

Patch jsonresume-theme-* packages to bundle-in all external assets.

Cons:

  • Must prefetch and retrieve hashes for every jsonresume-theme NPM package.
  • Must keep patches up-to-date when packages change the linked assets.

Pros:

  • Might be able to create wrapper for buildNpmPackage that performs this.

Rewrite HTML external asset links during HTML generation derivation.

Cons:

  • Updates cannot be one-shot updates of source rev + hash

Pros:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.