diff options
| author | quentin@aristote.fr <quentin@aristote.fr> | 2023-09-17 20:15:58 +0200 |
|---|---|---|
| committer | quentin@aristote.fr <quentin@aristote.fr> | 2023-09-17 20:18:43 +0200 |
| commit | 360c8a636b8f51c45689cc1518a628383f24420b (patch) | |
| tree | 0514dded3f05692c1d2cfd9821407e57b82cd1f6 /flake.nix | |
| parent | e84927bdf7cc528a56a0eaf9e7c3298117a5e02a (diff) | |
flake: use my-nixpkgs' devenv
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 85 |
1 files changed, 48 insertions, 37 deletions
@@ -2,48 +2,59 @@ description = "Quentin Aristote's CV."; inputs = { - data = { - # url = "github:qaristote/info"; - url = "github:qaristote/info"; - inputs = { - nixpkgs.follows = "/nixpkgs"; - flake-utils.follows = "/flake-utils"; - }; - }; + data.url = "github:qaristote/info"; + devenv.url = "github:cachix/devenv"; + my-nixpkgs.url = "github:qaristote/my-nixpkgs"; + nixpkgs = {}; }; - outputs = { self, nixpkgs, flake-utils, data }: - { - lib = import ./lib { inherit (nixpkgs) lib; }; - } // flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { - inherit system; - overlays = [ - (self: super: { - texlive = super.lib.recursiveUpdate super.texlive { - combined.moderncv = super.texlive.combine { - inherit (super.texlive) - scheme-basic biber biblatex latexmk luatex luatexbase - moderncv fontspec fontawesome5 academicons pgf multirow - arydshln emoji; - }; - }; - }) - ]; + nixConfig = { + extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="; + extra-trusted-substituters = "https://devenv.cachix.org"; + }; + + outputs = { + flake-parts, + my-nixpkgs, + ... + } @ inputs: + flake-parts.lib.mkFlake {inherit inputs;} ({ + self, + lib, + ... + }: { + imports = builtins.attrValues {inherit (my-nixpkgs.flakeModules) personal devenv;}; + + flake.lib = import ./lib {inherit lib;}; + + perSystem = {pkgs, ...}: let + latex = self.lib.pp.latex; + cv = import ./default.nix { + inherit pkgs latex; + data = inputs.data.lib.formatWith { + inherit pkgs; + markup = latex; + }; }; in { packages = { - texlive.combined.moderncv = pkgs.texlive.combined.moderncv; - cv = import ./default.nix { - inherit pkgs; - inherit (self.lib.pp) latex; - data = data.formatWith."${system}" self.lib.pp.latex; - }; + default = cv.pdf; + cv = cv.pdf; + cv_src = cv.src; }; - defaultPackage = self.packages."${system}".cv.pdf; - devShell = pkgs.mkShell { - packages = with pkgs; [ nixfmt texlive.combined.moderncv ]; + devenv.shells.default = { + languages = { + nix.enable = true; + texlive = { + enable = true; + packages = cv.latexDeps; + latexmk = { + enable = true; + output.pdf.enable = true; + }; + }; + }; }; - }); + }; + }); } |
