diff options
| author | Chris Wells <chris@mathematicaster.org> | 2026-02-06 09:13:38 -0600 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2026-02-06 09:13:38 -0600 |
| commit | 59e2d3fa6f4c0c81ad31589f2c5205b4d05499c6 (patch) | |
| tree | f5adc07a216d31cd69d611ff390c04f3cafb87cb /flake.nix | |
| parent | f4e56b237e9300ec0022a613a5e55e136c537f20 (diff) | |
| download | cv-59e2d3fa6f4c0c81ad31589f2c5205b4d05499c6.tar cv-59e2d3fa6f4c0c81ad31589f2c5205b4d05499c6.tar.gz cv-59e2d3fa6f4c0c81ad31589f2c5205b4d05499c6.tar.bz2 cv-59e2d3fa6f4c0c81ad31589f2c5205b4d05499c6.tar.lz cv-59e2d3fa6f4c0c81ad31589f2c5205b4d05499c6.tar.xz cv-59e2d3fa6f4c0c81ad31589f2c5205b4d05499c6.tar.zst cv-59e2d3fa6f4c0c81ad31589f2c5205b4d05499c6.zip | |
Added flake.nix
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 66 |
1 files changed, 47 insertions, 19 deletions
@@ -2,30 +2,58 @@ description = "My CV"; inputs = { nixpkgs.url = "github:nixos/nixpkgs"; - flake-utils.url = "github:numtide/flake-utils"; nix-filter.url = "github:numtide/nix-filter"; + latex-utils = { + url = "github:jmmaloney4/latex-utils"; + inputs = { + flake-parts.follows = "flake-parts"; + systems.follows = "systems"; + }; + }; + files.url = "github:mightyiam/files"; + flake-parts.url = "github:hercules-ci/flake-parts"; + systems.url = "github:nix-systems/default"; }; - outputs = { self, nixpkgs, flake-utils, nix-filter, ... }: { - overlays.default = import ./nix/overlay.nix { inherit nix-filter; }; - } // flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs { - inherit system; - overlays = [ self.overlays.default ]; - }; - in { - packages = { - inherit (pkgs.haskellPackages) mycv; - default = pkgs.haskellPackages.mycv; - }; + outputs = inputs@{ self, flake-parts, latex-utils, ... }: flake-parts.lib.mkFlake { inherit self inputs; } { + systems = import inputs.systems; + + imports = [ + latex-utils.modules.flake.latex-utils + inputs.files.flakeModules.default + ]; - devShells.default = pkgs.haskellPackages.shellFor { - packages = p: [ p.mycv ]; - withHoogle = true; - buildInputs = with pkgs.haskellPackages; [ - cabal-install - hpack + latex-utils = { + documents = [ + { + name = "cv.pdf"; + src = ./.; + inputFile = "cv.tex"; + } + ]; + }; + + + perSystem = { config, pkgs, ... }: { + devShells.default = pkgs.mkShellNoCC { + inputsFrom = [ + config.devShells.latex-utils + ]; + nativeBuildInputs = [ + config.files.writer.drv ]; }; + + files.files = [ + { + path_ = ".latexmkrc"; + drv = pkgs.writeText ".latexmkrc" /* perl */ '' + $out_dir = './build'; + $pdf_mode = 1; + $pdflatex = 'pdflatex -shell-escape -interaction=nonstopmode %O %S'; + ''; + } + ]; }; + }; } |
