From d1d2afcd456c706c7f8b63740e339fdca4182c24 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sun, 21 Jan 2024 09:41:38 -0600 Subject: [PATCH] feat!: migrate resume to typst with nix flakes backing --- .gitignore | 12 +-- .gitlab-ci.yml | 33 +------ developercv.cls | 252 ------------------------------------------------ flake.lock | 170 ++++++++++++++++++++++++++++++++ flake.nix | 32 ++++++ fontawesome.pdf | Bin 229866 -> 0 bytes resume.tex | 217 ----------------------------------------- resume.typ | 197 +++++++++++++++++++++++++++++++++++++ 8 files changed, 407 insertions(+), 506 deletions(-) delete mode 100644 developercv.cls create mode 100644 flake.lock create mode 100644 flake.nix delete mode 100644 fontawesome.pdf delete mode 100755 resume.tex create mode 100644 resume.typ diff --git a/.gitignore b/.gitignore index 9d77073..0ee2136 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,4 @@ -* -!.gitignore -!developercv.cls -!fontawesome.pdf -!resume.tex -!.gitlab-ci.yml -!TODO.norg -!README.md +result +conf.typ +*.pdf +*.gz diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1555a61..8bdac6c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ stages: + - setup - build - upload - release @@ -11,36 +12,10 @@ variables: build: stage: build - image: alpine:latest - variables: - TECTONIC_DEPS_CACHE_PATH: "${CI_PROJECT_DIR}/.cache/Tectonic" - TECTONIC_BIN_CACHE_PATH: "${CI_PROJECT_DIR}/tectonic" - cache: - policy: pull-push - when: on_success - paths: - - "${TECTONIC_DEPS_CACHE_PATH}" - - "${TECTONIC_BIN_CACHE_PATH}" + image: nixos/nix:latest script: | - mkdir -p "${CI_PROJECT_DIR}/.cache" - mkdir -p "${HOME}/.cache" - if [ -r "${TECTONIC_DEPS_CACHE_PATH}" ]; then - mv "${TECTONIC_DEPS_CACHE_PATH}" "${HOME}/.cache" - fi - - if ! [ -x ./tectonic ]; then - echo "Cache miss, tectonic binary not in cache! Redownloading!" - apk update - apk add curl - curl -L0 https://github.com/tectonic-typesetting/tectonic/releases/download/tectonic%400.14.1/tectonic-0.14.1-x86_64-unknown-linux-musl.tar.gz --output tectonic.tar.gz - tar -xf tectonic.tar.gz - fi - - echo "Compiling resume!" - ./tectonic -X compile --keep-logs ./resume.tex - echo "Finished compiling resume, saving caches" - - mv "${HOME}/.cache/Tectonic" "${CI_PROJECT_DIR}/.cache/Tectonic" + nix --extra-experimental-features "flakes nix-command" build + mv "./result/${RESUME_FILE}" $(pwd) artifacts: expire_in: 1 week paths: diff --git a/developercv.cls b/developercv.cls deleted file mode 100644 index 02a2d5a..0000000 --- a/developercv.cls +++ /dev/null @@ -1,252 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Developer CV -% LaTeX Class -% Version 1.0 (28/1/19) -% -% This class originates from: -% http://www.LaTeXTemplates.com -% -% Authors: -% Jan Vorisek (jan@vorisek.me) -% Based on a template by Jan Küster (info@jankuester.com) -% Modified for LaTeX Templates by Vel (vel@LaTeXTemplates.com) -% -% License: -% The MIT License (see included LICENSE file) -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%---------------------------------------------------------------------------------------- -% Colors -%---------------------------------------------------------------------------------------- - -\usepackage{pagecolor} -\definecolor{SumiInk0}{HTML}{16161D} -\definecolor{SumiInk1}{HTML}{181820} -\definecolor{SumiInk2}{HTML}{1a1a22} -\definecolor{SumiInk3}{HTML}{1F1F28} -\definecolor{SumiInk4}{HTML}{2A2A37} -\definecolor{SumiInk5}{HTML}{363646} -\definecolor{SumiInk6}{HTML}{54546D} -\definecolor{WaveBlue1}{HTML}{223249} -\definecolor{WaveBlue2}{HTML}{2D4F67} -\definecolor{WinterGreen}{HTML}{2B3328} -\definecolor{WinterYellow}{HTML}{49443C} -\definecolor{WinterRed}{HTML}{43242B} -\definecolor{WinterBlue}{HTML}{252535} -\definecolor{AutumnGreen}{HTML}{76946A} -\definecolor{AutumnRed}{HTML}{C34043} -\definecolor{AutumnYellow}{HTML}{DCA561} -\definecolor{SamuraiRed}{HTML}{E82424} -\definecolor{RoninYellow}{HTML}{FF9E3B} -\definecolor{WaveAqua1}{HTML}{6A9589} -\definecolor{DragonBlue}{HTML}{658594} -\definecolor{OldWhite}{HTML}{C8C093} -\definecolor{FujiWhite}{HTML}{DCD7BA} -\definecolor{FujiGray}{HTML}{727169} -\definecolor{OniViolet}{HTML}{957FB8} -\definecolor{OniViolet2}{HTML}{b8b4d0} -\definecolor{CrystalBlue}{HTML}{7E9CD8} -\definecolor{SpringViolet1}{HTML}{938AA9} -\definecolor{SpringViolet2}{HTML}{9CABCA} -\definecolor{SpringBlue}{HTML}{7FB4CA} -\definecolor{LightBlue}{HTML}{A3D4D5} -\definecolor{WaveAqua2}{HTML}{7AA89F} -\definecolor{SpringGreen}{HTML}{98BB6C} -\definecolor{BoatYellow1}{HTML}{938056} -\definecolor{BoatYellow2}{HTML}{C0A36E} -\definecolor{CarpYellow}{HTML}{E6C384} -\definecolor{SakuraPink}{HTML}{D27E99} -\definecolor{WaveRed}{HTML}{E46876} -\definecolor{PeachRed}{HTML}{FF5D62} -\definecolor{SurimiOrange}{HTML}{FFA066} -\definecolor{KatanaGray}{HTML}{717C7C} - -%---------------------------------------------------------------------------------------- -% CLASS CONFIGURATION -%---------------------------------------------------------------------------------------- - -\NeedsTeXFormat{LaTeX2e} -\ProvidesClass{developercv}[2019/01/28 Developer CV class v1.0] - -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{extarticle}} % Pass through any options to the base class -\ProcessOptions\relax % Process given options - -\LoadClass{extarticle} % Load the base class - -%---------------------------------------------------------------------------------------- -% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS -%---------------------------------------------------------------------------------------- - -\setlength{\parindent}{0mm} % Suppress paragraph indentation - -\usepackage[hidelinks]{hyperref} % Required for links but hide the default boxes around links - -\newcommand{\lorem}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.} % Dummy text - -\pagestyle{empty} % No headers or footers - -\usepackage{moresize} % Provides more font size commands (\HUGE and \ssmall) - -%---------------------------------------------------------------------------------------- -% PAGE LAYOUT -%---------------------------------------------------------------------------------------- - -\usepackage{geometry} % Required for adjusting page dimensions and margins - -\geometry{ - paper=a4paper, % Paper size, change to letterpaper for US letter size - top=1.75cm, % Top margin - bottom=1.75cm, % Bottom margin - left=2cm, % Left margin - right=2cm, % Right margin - headheight=0.75cm, % Header height - footskip=1cm, % Space from the bottom margin to the baseline of the footer - headsep=0.5cm, % Space from the top margin to the baseline of the header - %showframe, % Uncomment to show how the type block is set on the page -} - -%---------------------------------------------------------------------------------------- -% FONTS -%---------------------------------------------------------------------------------------- - -\usepackage[utf8]{inputenc} % Required for inputting international characters -\usepackage[T1]{fontenc} % Output font encoding for international characters - -\usepackage[default]{raleway} -%\usepackage[defaultsans]{droidsans} -%\usepackage{cmbright} -%\usepackage{fetamont} -%\usepackage[default]{gillius} -%\usepackage{roboto} - -\renewcommand*\familydefault{\sfdefault} % Force the sans-serif version of any font used - -%------------------------------------------------ - -\usepackage{fontawesome} % Required for FontAwesome icons - -% Command to output an icon in a SumiInk5 square box with text to the right -\newcommand{\icon}[3]{% The first parameter is the FontAwesome icon name, the second is the box size and the third is the text - \vcenteredhbox{\colorbox{SumiInk5}{\makebox(#2, #2){\textcolor{FujiWhite}{\large\csname fa#1\endcsname}}}}% Icon and box - \hspace{0.2cm}% FujiWhitespace - \vcenteredhbox{\textcolor{FujiWhite}{#3}}% Text -} - -%---------------------------------------------------------------------------------------- -% GRAPHICS DEFINITIONS -%---------------------------------------------------------------------------------------- - -\usepackage{tikz} % Required for creating the plots -\usetikzlibrary{shapes, backgrounds} -\tikzset{x=1cm, y=1cm} % Default tikz units - -% Command to vertically centre adjacent content -\newcommand{\vcenteredhbox}[1]{% The only parameter is for the content to centre - \begingroup% - \setbox0=\hbox{#1}\parbox{\wd0}{\box0}% - \endgroup% -} - -%---------------------------------------------------------------------------------------- -% CHARTS -%---------------------------------------------------------------------------------------- - -\newcounter{barcount} - -% Environment to hold a new bar chart -\newenvironment{barchart}[1]{ % The only parameter is the maximum bar width, in cm - \newcommand{\barwidth}{0.35} - \newcommand{\barsep}{0.2} - - % Command to add a bar to the bar chart - \newcommand{\baritem}[2]{ % The first argument is the bar label and the second is the percentage the current bar should take up of the total width - \pgfmathparse{##2} - \let\perc\pgfmathresult - - \pgfmathparse{#1} - \let\barsize\pgfmathresult - - \pgfmathparse{\barsize*##2/100} - \let\barone\pgfmathresult - - \pgfmathparse{(\barwidth*\thebarcount)+(\barsep*\thebarcount)} - \let\barx\pgfmathresult - - \filldraw[fill=SurimiOrange, draw=none] (0,-\barx) rectangle (\barone,-\barx-\barwidth); - - \node [label=180:\colorbox{SumiInk5}{\textcolor{SurimiOrange}{##1}}] at (0,-\barx-0.175) {}; - \addtocounter{barcount}{1} - } - \begin{tikzpicture} - \setcounter{barcount}{0} -}{ - \end{tikzpicture} -} - -%------------------------------------------------ - -\newcounter{a} -\newcounter{b} -\newcounter{c} - -% Command to output a number of automatically-sized bubbles from a string in the format of '/