diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 9aba7e1..4730fc5 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -34,6 +34,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./main.pdf + asset_path: ./diogo-correia-cv.pdf asset_name: diogo-correia-cv.pdf asset_content_type: pdf \ No newline at end of file diff --git a/.gitignore b/.gitignore index dbee458..70113c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -# Files placed at build time -vendor* +# Build output *.pdf # Nix diff --git a/alias.typ b/alias.typ index fd2b2d2..7c9eaac 100644 --- a/alias.typ +++ b/alias.typ @@ -1,4 +1,4 @@ -#import "template/lib.typ": https, github_href +#import "template/lib.typ": github_href, https #let sub(name, href: "") = { if href != "" { @@ -28,11 +28,25 @@ // projects #let neuroglass = sub("NeuroGlass", href: "neuroglass.com") #let ohif = sub("OHIF", href: "ohif.org") -#let neuroglancer = sub("Neuroglancer", href: github_href("google", repo: "neuroglancer")) +#let neuroglancer = sub("Neuroglancer", href: github_href( + "google", + repo: "neuroglancer", +)) #let monai = sub("MONAI", href: "monai.io") -#let monailabel = sub("MONAILabel", href: github_href("Project-MONAI", repo: "MONAILabel")) -#let esckan = sub("ESCKAN", href: github_href("MetaCell", repo: "sckan-explorer", branch: "develop")) -#let celegans = sub("C-Elegans", href: github_href("MetaCell", repo: "c-elegans-app", branch: "develop")) +#let monailabel = sub("MONAILabel", href: github_href( + "Project-MONAI", + repo: "MONAILabel", +)) +#let esckan = sub("ESCKAN", href: github_href( + "MetaCell", + repo: "sckan-explorer", + branch: "develop", +)) +#let celegans = sub("C-Elegans", href: github_href( + "MetaCell", + repo: "c-elegans-app", + branch: "develop", +)) #let gitlabce = sub("GitLab CE", href: "gitlab.com/rluna-gitlab/gitlab-ce") // tools diff --git a/flake.lock b/flake.lock index 6ec80a6..c103d1b 100644 --- a/flake.lock +++ b/flake.lock @@ -1,24 +1,6 @@ { "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "font-awesome": { + "font-awesome-icons": { "flake": false, "locked": { "lastModified": 1753367239, @@ -36,11 +18,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1753429684, - "narHash": "sha256-9h7+4/53cSfQ/uA3pSvCaBepmZaz/dLlLVJnbQ+SJjk=", + "lastModified": 1784120854, + "narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7fd36ee82c0275fb545775cc5e4d30542899511d", + "rev": "753cc8a3a87467296ddd1fa93f0cc3e81120ee46", "type": "github" }, "original": { @@ -50,47 +32,26 @@ "type": "github" } }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "font-awesome": "font-awesome", - "nixpkgs": "nixpkgs", - "typix": "typix" - } - }, - "systems": { + "press": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "lastModified": 1784147715, + "narHash": "sha256-I+22XHq4scdGVyK9OBPinyi2Fm7OArAzik+54tdUFvI=", + "owner": "RossSmyth", + "repo": "press", + "rev": "b69e5c04c5c4f1c4ff0bd7bebf0a7976f3203116", "type": "github" }, "original": { - "owner": "nix-systems", - "repo": "default", + "owner": "RossSmyth", + "repo": "press", "type": "github" } }, - "typix": { + "root": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1753174145, - "narHash": "sha256-XX2y2qpcDeYnQLRa1d0M9r7NY/y7J7tckNVUt7fqYmc=", - "owner": "loqusion", - "repo": "typix", - "rev": "2b2d811466cac1ab4636a73fe605f24ff3dc6463", - "type": "github" - }, - "original": { - "owner": "loqusion", - "repo": "typix", - "type": "github" + "font-awesome-icons": "font-awesome-icons", + "nixpkgs": "nixpkgs", + "press": "press" } } }, diff --git a/flake.nix b/flake.nix index 288ec66..3cbfbae 100644 --- a/flake.nix +++ b/flake.nix @@ -2,137 +2,138 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - typix = { - url = "github:loqusion/typix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - flake-utils.url = "github:numtide/flake-utils"; + press.url = "github:RossSmyth/press"; - font-awesome = { + font-awesome-icons = { url = "github:FortAwesome/Font-Awesome"; flake = false; }; }; outputs = - inputs@{ + { + self, nixpkgs, - typix, - flake-utils, + press, + font-awesome-icons, ... }: - flake-utils.lib.eachDefaultSystem ( - system: - let - pkgs = nixpkgs.legacyPackages.${system}; - inherit (pkgs) lib; + let + inherit (nixpkgs) lib; + forAllSystems = lib.genAttrs lib.systems.flakeExposed; + + nixpkgsFor = forAllSystems ( + system: + import nixpkgs { + inherit system; + overlays = [ + press.overlays.default + self.overlays.default + ]; + } + ); + in + { + overlays.default = final: _prev: { + diogo-correia-cv = final.callPackage ./package.nix { }; + font-awesome-icons = font-awesome-icons; + font-awesome-typst = final.callPackage ./font-awesome-typst { }; + get-projects-metadata = final.writeShellApplication { + name = "get-projects-metadata"; + runtimeInputs = [ + final.curl + final.jq + ]; + text = builtins.readFile ./scripts/get-projects-metadata.sh; + }; + }; - typixLib = typix.lib.${system}; + checks = forAllSystems (system: { + test-cv-builds = self.packages.${system}.default; + }); - src = typixLib.cleanTypstSource ./.; - commonArgs = { - typstSource = "main.typ"; + packages = forAllSystems (system: { + default = nixpkgsFor.${system}.diogo-correia-cv; + }); - fontPaths = [ - # Add paths to fonts here - "${pkgs.roboto-slab}/share/fonts/truetype" - "${pkgs.lato}/share/fonts/lato" - ]; + apps = forAllSystems ( + system: + let + pkgs = nixpkgsFor.${system}; + cv = pkgs.diogo-correia-cv; - virtualPaths = [ - # Add paths that must be locally accessible to typst here - { - dest = "template/vendor/icons"; - src = "${inputs.font-awesome}/svgs"; - } + output = "diogo-correia-cv.pdf"; + + mkApp = { - dest = "template/gh-metadata"; - src = ./template/gh-metadata; - } + name, + text, + runtimeInputs ? [ ], + }: { - dest = "photos"; - src = ./photos; - } - ]; - }; - - # Compile a Typst project, *without* copying the result - # to the current directory - build-drv = typixLib.buildTypstProject (commonArgs // { inherit src; }); - - # Compile a Typst project, and then copy the result - # to the current directory - build-script = typixLib.buildTypstProjectLocal (commonArgs // { inherit src; }); + type = "app"; + program = lib.getExe (pkgs.writeShellApplication { inherit name runtimeInputs text; }); + }; + in + rec { + default = dev; - # Watch a project and recompile on changes - watch-script = typixLib.watchTypstProject commonArgs; + dev = mkApp { + name = "dev"; + runtimeInputs = [ cv.typst-wrapped ]; + text = '' + exec typst watch main.typ ${output} + ''; + }; - # Fetch json metadata for the GitHub projects - gen-script = - { repos }: - pkgs.writeShellApplication { - name = "update-projects-metadata-script"; - runtimeInputs = [ pkgs.curl ]; + build = mkApp { + name = "build"; text = '' - mkdir -p template/gh-metadata - repos=(${builtins.concatStringsSep " " (map (r: "${r.owner}/${r.repo}") repos)}) - for repo in "''${repos[@]}"; do - IFS=/ read -r owner name <<< "$repo" - curl -H "Accept: application/vnd.github+json" \ - "https://api.github.com/repos/$owner/$name" | \ - jq '.' > template/gh-metadata/"$owner""_""$name.json" - done + install -m644 ${cv} ${output} ''; }; - format-script = pkgs.writeShellApplication { - name = "format-script"; + gen = mkApp { + name = "gen"; + runtimeInputs = [ pkgs.get-projects-metadata ]; + text = '' + get-projects-metadata template/gh-metadata \ + wavecomtech/omlox-client-go \ + NixOS/nixpkgs + ''; + }; + } + ); + + formatter = forAllSystems ( + system: + let + pkgs = nixpkgsFor.${system}; + in + pkgs.nixfmt-tree.override { runtimeInputs = [ pkgs.typstyle ]; - text = '' - typstyle -i ./**/*.typ - ''; - }; - in - { - checks = { - inherit build-drv build-script watch-script; - }; - - packages.default = build-drv; - - apps = rec { - default = watch; - build = flake-utils.lib.mkApp { drv = build-script; }; - watch = flake-utils.lib.mkApp { drv = watch-script; }; - gen = flake-utils.lib.mkApp { - drv = gen-script { - repos = [ - { - owner = "wavecomtech"; - repo = "omlox-client-go"; - } - { - owner = "NixOS"; - repo = "nixpkgs"; - } - ]; - }; + settings.formatter.typstyle = { + command = "typstyle"; + options = [ "-i" ]; + includes = [ "*.typ" ]; }; - format = flake-utils.lib.mkApp { drv = format-script; }; - }; - - devShells.default = typixLib.devShell { - inherit (commonArgs) fontPaths virtualPaths; - packages = [ - # WARNING: Don't run `typst-build` directly, instead use `nix run .#build` - # See https://github.com/loqusion/typix/issues/2 - # build-script - watch-script - - pkgs.typstyle - ]; - }; - } - ); + } + ); + + devShells = forAllSystems ( + system: + let + pkgs = nixpkgsFor.${system}; + in + { + default = pkgs.mkShellNoCC { + inputsFrom = [ pkgs.diogo-correia-cv ]; + packages = [ + pkgs.tinymist + pkgs.typstyle + ]; + }; + } + ); + }; } diff --git a/font-awesome-typst/default.nix b/font-awesome-typst/default.nix new file mode 100644 index 0000000..83a1f2f --- /dev/null +++ b/font-awesome-typst/default.nix @@ -0,0 +1,14 @@ +{ + buildTypstPackage, + font-awesome-icons, +}: + +buildTypstPackage { + pname = "font-awesome"; + version = "7.0.0"; + src = ./.; + + postInstall = '' + cp -r ${font-awesome-icons}/svgs "$out/lib/typst-packages/font-awesome/7.0.0/svgs" + ''; +} diff --git a/font-awesome-typst/lib.typ b/font-awesome-typst/lib.typ new file mode 100644 index 0000000..0ebdf30 --- /dev/null +++ b/font-awesome-typst/lib.typ @@ -0,0 +1,8 @@ +#let icon-path(name, collection: "solid") = ( + "svgs/" + collection + "/" + name + ".svg" +) + +#let icon-image(name, collection: "solid", ..args) = image( + icon-path(name, collection: collection), + ..args, +) diff --git a/font-awesome-typst/typst.toml b/font-awesome-typst/typst.toml new file mode 100644 index 0000000..4d1d89e --- /dev/null +++ b/font-awesome-typst/typst.toml @@ -0,0 +1,4 @@ +[package] +name = "font-awesome" +version = "7.0.0" +entrypoint = "lib.typ" diff --git a/main.typ b/main.typ index 9f21a1e..daa5afe 100644 --- a/main.typ +++ b/main.typ @@ -1,4 +1,7 @@ -#import "template/cv.typ": cv, experience, chronology, education, organization, github_card, tag, skill, hrule +#import "template/cv.typ": ( + chronology, cv, education, experience, github_card, hrule, organization, + skill, tag, +) #import "template/lib.typ": * #import "alias.typ": * @@ -34,7 +37,7 @@ #let siemens-ai-post = link( "https://blog.siemens.com/2025/10/our-sovereign-ai-journey-building-a-self-contained-sustainable-and-cost-effective-llm-platform/", - "open weight AI models" + "open weight AI models", ) - Work through incoming issues, contributing internally and upstream @@ -156,8 +159,8 @@ title: "Vice President", org: hardwarecity, period: ( - start: datetime(day: 1, month: 10, year: 2023) - ) + start: datetime(day: 1, month: 10, year: 2023), + ), )[ Create an open and sustainable community around product development. ] diff --git a/package.nix b/package.nix new file mode 100644 index 0000000..64c368c --- /dev/null +++ b/package.nix @@ -0,0 +1,21 @@ +{ + lato, + roboto-slab, + buildTypstDocument, + font-awesome-typst, +}: + +buildTypstDocument { + pname = "diogo-correia-cv"; + version = "1.0"; + + src = ./.; + file = "main.typ"; + + typstEnv = _: [ font-awesome-typst ]; + + fonts = [ + roboto-slab + lato + ]; +} diff --git a/scripts/get-projects-metadata.sh b/scripts/get-projects-metadata.sh new file mode 100644 index 0000000..a76f3e8 --- /dev/null +++ b/scripts/get-projects-metadata.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +out_dir="$1" +shift +mkdir -p "$out_dir" + +for repository; do + curl --fail --silent --show-error \ + -H "Accept: application/vnd.github+json" \ + "https://api.github.com/repos/$repository" | + jq '.' >"$out_dir/${repository//\//_}.json" +done diff --git a/template/cv.typ b/template/cv.typ index 7a7e7d4..f5a9400 100644 --- a/template/cv.typ +++ b/template/cv.typ @@ -238,8 +238,8 @@ } #h(space.small) #box[#link( - github_href(org, repo: repo), - )[#icon("book-bookmark")*#meta.full_name*]] \ + github_href(org, repo: repo), + )[#icon("book-bookmark")*#meta.full_name*]] \ #text(colors.gray_700)[#meta.description] \ #( diff --git a/template/gh-metadata/NixOS_nixpkgs.json b/template/gh-metadata/NixOS_nixpkgs.json index 9716b46..3f4dd5e 100644 --- a/template/gh-metadata/NixOS_nixpkgs.json +++ b/template/gh-metadata/NixOS_nixpkgs.json @@ -66,16 +66,16 @@ "releases_url": "https://api.github.com/repos/NixOS/nixpkgs/releases{/id}", "deployments_url": "https://api.github.com/repos/NixOS/nixpkgs/deployments", "created_at": "2012-06-04T02:49:46Z", - "updated_at": "2026-03-08T18:39:21Z", - "pushed_at": "2026-03-08T18:39:34Z", + "updated_at": "2026-07-16T23:42:58Z", + "pushed_at": "2026-07-16T23:48:45Z", "git_url": "git://github.com/NixOS/nixpkgs.git", "ssh_url": "git@github.com:NixOS/nixpkgs.git", "clone_url": "https://github.com/NixOS/nixpkgs.git", "svn_url": "https://github.com/NixOS/nixpkgs", "homepage": "", - "size": 2849060, - "stargazers_count": 23758, - "watchers_count": 23758, + "size": 3288181, + "stargazers_count": 25435, + "watchers_count": 25435, "language": "Nix", "has_issues": true, "has_projects": true, @@ -83,11 +83,11 @@ "has_wiki": false, "has_pages": false, "has_discussions": false, - "forks_count": 18217, + "forks_count": 19537, "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 18930, + "open_issues_count": 21217, "license": { "key": "mit", "name": "MIT License", @@ -108,9 +108,9 @@ "nixpkgs" ], "visibility": "public", - "forks": 18217, - "open_issues": 18930, - "watchers": 23758, + "forks": 19537, + "open_issues": 21217, + "watchers": 25435, "default_branch": "master", "temp_clone_token": null, "custom_properties": {}, @@ -135,6 +135,6 @@ "user_view_type": "public", "site_admin": false }, - "network_count": 18217, - "subscribers_count": 274 + "network_count": 19537, + "subscribers_count": 276 } diff --git a/template/gh-metadata/wavecomtech_omlox-client-go.json b/template/gh-metadata/wavecomtech_omlox-client-go.json index a8aa130..d184c36 100644 --- a/template/gh-metadata/wavecomtech_omlox-client-go.json +++ b/template/gh-metadata/wavecomtech_omlox-client-go.json @@ -66,14 +66,14 @@ "releases_url": "https://api.github.com/repos/wavecomtech/omlox-client-go/releases{/id}", "deployments_url": "https://api.github.com/repos/wavecomtech/omlox-client-go/deployments", "created_at": "2023-10-27T14:47:38Z", - "updated_at": "2026-01-04T18:59:18Z", - "pushed_at": "2025-12-12T11:35:27Z", + "updated_at": "2026-06-25T14:56:32Z", + "pushed_at": "2026-06-25T14:56:25Z", "git_url": "git://github.com/wavecomtech/omlox-client-go.git", "ssh_url": "git@github.com:wavecomtech/omlox-client-go.git", "clone_url": "https://github.com/wavecomtech/omlox-client-go.git", "svn_url": "https://github.com/wavecomtech/omlox-client-go", "homepage": "", - "size": 81, + "size": 89, "stargazers_count": 11, "watchers_count": 11, "language": "Go", @@ -83,11 +83,11 @@ "has_wiki": false, "has_pages": false, "has_discussions": true, - "forks_count": 2, + "forks_count": 3, "mirror_url": null, "archived": false, "disabled": false, - "open_issues_count": 1, + "open_issues_count": 2, "license": { "key": "mit", "name": "MIT License", @@ -112,8 +112,8 @@ "rtls" ], "visibility": "public", - "forks": 2, - "open_issues": 1, + "forks": 3, + "open_issues": 2, "watchers": 11, "default_branch": "main", "temp_clone_token": null, @@ -139,6 +139,6 @@ "user_view_type": "public", "site_admin": false }, - "network_count": 2, + "network_count": 3, "subscribers_count": 4 } diff --git a/template/lib.typ b/template/lib.typ index 41bbd3c..87c317c 100644 --- a/template/lib.typ +++ b/template/lib.typ @@ -1,3 +1,5 @@ +#import "@preview/font-awesome:7.0.0": icon-image + #let text_10 = ( tiny: 5pt, scriptsize: 7pt, @@ -65,7 +67,7 @@ box( baseline: shift, height: height, - image("vendor/icons/" + collection + "/" + name + ".svg"), + icon-image(name, collection: collection), ) h(space.small) }