From 49eb409b6a840cb65c30c2512f475490c861f3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Fri, 24 Nov 2023 23:22:30 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(hydrogen/nginx)=20update=20resume?= =?UTF-8?q?=20+=20stop=20using=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 156 +++++++++++++++++- flake.nix | 22 ++- .../services/nginx/laurent/resume.nix | 12 +- 3 files changed, 168 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index cad97f5..c36579b 100644 --- a/flake.lock +++ b/flake.lock @@ -99,6 +99,28 @@ "type": "github" } }, + "crane_3": { + "inputs": { + "nixpkgs": [ + "resume", + "typst", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1698166613, + "narHash": "sha256-y4rdN4flxRiROqNi1waMYIZj/Fs7L2OrszFk/1ry9vU=", + "owner": "ipetkov", + "repo": "crane", + "rev": "b7db46f0f1751f7b1d1911f6be7daf568ad5bc65", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -175,6 +197,23 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1696343447, + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -262,11 +301,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1700833656, - "narHash": "sha256-2961vctd4vybU+Nr1mEIxAyu7/wy4/U3NohQG6lQvWU=", + "lastModified": 1700862359, + "narHash": "sha256-gNtAZ9m5gTT0C/HTiqAVGQ2MPH+TBoIKBvROPJvlHWQ=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "d79cf0afe26fd6503a47c17a524d45742bf2461a", + "rev": "745b998587fc39db6e3f77caa54074da618cd509", "type": "github" }, "original": { @@ -355,6 +394,24 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1696019113, + "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1685801374, @@ -403,6 +460,38 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1700612854, + "narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1698318101, + "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "63678e9f3d3afecfeafa0acead6239cdb447574c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -434,6 +523,28 @@ "type": "github" } }, + "resume": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": "nixpkgs_4", + "typst": "typst" + }, + "locked": { + "lastModified": 1700863443, + "narHash": "sha256-5QF0vNsE4HjJyuIdJA0uX0XCyc2igkgp+CMi5MRLKos=", + "ref": "refs/heads/master", + "rev": "cfd5bde6535914550f8344e6ba36d9a7516756a2", + "revCount": 10, + "type": "git", + "url": "https://git.fainsin.bzh/Laurent/resume" + }, + "original": { + "type": "git", + "url": "https://git.fainsin.bzh/Laurent/resume" + } + }, "root": { "inputs": { "agenix": "agenix", @@ -442,7 +553,8 @@ "hyprland": "hyprland", "lanzaboote": "lanzaboote", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_3", + "resume": "resume" } }, "rust-overlay": { @@ -540,6 +652,42 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "typst": { + "inputs": { + "crane": "crane_3", + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_5", + "systems": "systems_4" + }, + "locked": { + "lastModified": 1700840283, + "narHash": "sha256-ZueG6hz0W92izpJUkLcNQP+s06hGpHp9r/zx7nweYMc=", + "owner": "typst", + "repo": "typst", + "rev": "2f795b5c07171affa0709195a9dae3ed5c0afbeb", + "type": "github" + }, + "original": { + "owner": "typst", + "repo": "typst", + "type": "github" + } + }, "wlroots": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index fcbb5bb..290a676 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,8 @@ # url = "git+file:///home/laurent/Documents/nixpkgs?shallow=1"; }; + flake-utils.url = "github:numtide/flake-utils"; + lanzaboote = { url = "github:nix-community/lanzaboote"; # inputs.nixpkgs.follows = "nixpkgs"; @@ -23,14 +25,14 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland = { - url = "github:hyprwm/Hyprland"; - # inputs.nixpkgs.follows = "nixpkgs"; + hyprland.url = "github:hyprwm/Hyprland"; + + nixos-hardware.url = "github:nixos/nixos-hardware"; + + resume = { + url = "git+https://git.fainsin.bzh/Laurent/resume"; + inputs.flake-utils.follows = "flake-utils"; }; - - nixos-hardware = { url = "github:nixos/nixos-hardware"; }; - - flake-utils = { url = "github:numtide/flake-utils"; }; }; nixConfig = { @@ -76,8 +78,12 @@ }; # hydrogen vps - nixosConfigurations.hydrogen = nixpkgs.lib.nixosSystem { + nixosConfigurations.hydrogen = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; + specialArgs = { + inherit inputs; + inherit system; + }; modules = [ ./hosts/hydrogen home-manager.nixosModules.home-manager diff --git a/hosts/hydrogen/services/nginx/laurent/resume.nix b/hosts/hydrogen/services/nginx/laurent/resume.nix index ad6154b..0c6cb4f 100644 --- a/hosts/hydrogen/services/nginx/laurent/resume.nix +++ b/hosts/hydrogen/services/nginx/laurent/resume.nix @@ -1,19 +1,11 @@ -{ pkgs, ... }: -let - pages = pkgs.fetchgit { - url = "https://git.fainsin.bzh/Laurent/resume"; - fetchLFS = true; # https://github.com/go-gitea/gitea/issues/4773 - rev = "ae7d671cca11d6046197dcfd3e1d59a7a3752082"; # pages - sha256 = "sha256-rnWbT3AYjS6DwXlfoNPFGHZae7yvXoNHRWvHeWceG/M="; - }; -in { +{ inputs, system, ... }: { services.nginx.virtualHosts = { "resume.laurent.fainsin.bzh" = { enableACME = true; forceSSL = true; locations = { "/" = { - root = "${pages}/"; + root = inputs.resume.packages.${system}.default; index = "resume.pdf"; }; };