From ac011a40efe8ef85efadb01cab206f85c56ed860 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Sat, 17 Jun 2023 02:07:48 -0700 Subject: [PATCH] Use resume flake as input --- flake.lock | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++- flake.nix | 15 +++++-------- 2 files changed, 70 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index c8bb180..ffb8ada 100644 --- a/flake.lock +++ b/flake.lock @@ -18,6 +18,24 @@ "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": { "locked": { "lastModified": 1686949509, @@ -32,10 +50,41 @@ "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": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "resumePackage": "resumePackage" } }, "systems": { @@ -52,6 +101,21 @@ "repo": "default", "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", diff --git a/flake.nix b/flake.nix index 1247645..61e431c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,11 +1,12 @@ { - description = "A very basic flake"; + description = "Professional website"; inputs = { 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; } // @@ -14,17 +15,12 @@ pkgs = import nixpkgs { inherit system; }; in { - packages.default = - let - resumePackage = pkgs.callPackage /home/greg/code/active/resume/default.nix { }; - in - pkgs.stdenv.mkDerivation { + packages.default = pkgs.stdenv.mkDerivation { name = "greg.everydayimshuflin.com-website"; src = ./.; - buildInputs = [ resumePackage ]; installPhase = '' - mkdir $out + mkdir -p $out/resume cp index.html $out @@ -32,7 +28,6 @@ cp self.jpg $out cp favicon.png $out - mkdir $out/resume/ cp ${resumePackage}/*.pdf $out/resume '';