Use resume flake as input

This commit is contained in:
Greg Shuflin 2023-06-17 02:07:48 -07:00
parent 6588b1d220
commit ac011a40ef
2 changed files with 70 additions and 11 deletions

View File

@ -18,6 +18,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1686949509, "lastModified": 1686949509,
@ -32,10 +50,41 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1686949509,
"narHash": "sha256-52OTWmIjf5t5VcoGhSjRsCWHlwSf/mPhY+0fpaiA1hs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "992ccdd822ecff0712ed0004f89df9e96f6a4963",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"resumePackage": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1686992437,
"narHash": "sha256-3b5wKPMx34uUt/rGgal8hvb+zrncFLkNXLOkFOxwPo0=",
"path": "/home/greg/code/active/resume",
"type": "path"
},
"original": {
"path": "/home/greg/code/active/resume",
"type": "path"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"resumePackage": "resumePackage"
} }
}, },
"systems": { "systems": {
@ -52,6 +101,21 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -1,11 +1,12 @@
{ {
description = "A very basic flake"; description = "Professional website";
inputs = { inputs = {
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
resumePackage.url = "path:/home/greg/code/active/resume";
}; };
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs, flake-utils, resumePackage }:
{ {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
} // } //
@ -14,17 +15,12 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
packages.default = packages.default = pkgs.stdenv.mkDerivation {
let
resumePackage = pkgs.callPackage /home/greg/code/active/resume/default.nix { };
in
pkgs.stdenv.mkDerivation {
name = "greg.everydayimshuflin.com-website"; name = "greg.everydayimshuflin.com-website";
src = ./.; src = ./.;
buildInputs = [ resumePackage ];
installPhase = '' installPhase = ''
mkdir $out mkdir -p $out/resume
cp index.html $out cp index.html $out
@ -32,7 +28,6 @@
cp self.jpg $out cp self.jpg $out
cp favicon.png $out cp favicon.png $out
mkdir $out/resume/
cp ${resumePackage}/*.pdf $out/resume cp ${resumePackage}/*.pdf $out/resume
''; '';