-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
48 lines (41 loc) · 1.41 KB
/
flake.nix
File metadata and controls
48 lines (41 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
description = "My CV";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
latex-cv-class.url = "github:Cybolic/latex-cv-class";
};
outputs = { self, nixpkgs, flake-utils, latex-cv-class }:
with flake-utils.lib; eachSystem allSystems (system:
let
pkgs = import nixpkgs { inherit system; };
cvBuildPkgs = latex-cv-class.packages.${system};
resumeShortYaml = pkgs.runCommand "processed-resume.yaml" {
buildInputs = [ pkgs.yq-go ];
} ''
# Remove:
# - `projects`
# _ my initial project based position at TrainAway (we don't need two positions for the same company)
# - my initial frontend position at Anthill
yq 'del(.projects) | .work |= map(select(.startDate != "2017-04-11" and .startDate != "2011-11-16"))' ${./resume.yaml} > $out
'';
in rec{
packages = {
pdfFull = cvBuildPkgs.yamlToPdf {
inputYaml = ./resume.yaml;
};
pdf = cvBuildPkgs.yamlToPdf {
inputYaml = resumeShortYaml;
};
lint = pkgs.writeShellApplication {
name = "lint";
runtimeInputs = [ cvBuildPkgs.lint ];
text = /* bash */ ''
lint-resume ./resume.yaml
'';
};
};
defaultPackage = packages.pdf;
}
);
}