From 87a307c89aecef3498d5e57ec0ee1daff75fa3d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Fri, 11 Oct 2024 22:11:08 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(cesium)=20add=20projet-fin-etude?= =?UTF-8?q?=20as=20flake=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 39 ++++++++++++++++--- flake.nix | 6 +++ .../services/nginx/n7/projet-fin-etude.nix | 23 ++++++----- 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 9dac915..04ff832 100644 --- a/flake.lock +++ b/flake.lock @@ -170,11 +170,11 @@ ] }, "locked": { - "lastModified": 1728638019, - "narHash": "sha256-eEga9ZYpWr4ippI8ntBdcNkXWY7qv1/9kK9jkemAyzQ=", + "lastModified": 1728673344, + "narHash": "sha256-Iqo1nHEkBeucGE48EWYbZkx9LAPAWyEkzAWH+fPXTUM=", "owner": "nix-community", "repo": "disko", - "rev": "6af4e02b9cf2a4126af542c9e299f13228cfe2e0", + "rev": "a3619332369e1d254c68be5f019b3a8632e79bbc", "type": "github" }, "original": { @@ -307,11 +307,11 @@ ] }, "locked": { - "lastModified": 1728598744, - "narHash": "sha256-sSfvyO5xH3HObHHmh6lp/hcvo7tMjFKd/HXpxyrRnoE=", + "lastModified": 1728650932, + "narHash": "sha256-mGKzqdsRyLnGNl6WjEr7+sghGgBtYHhJQ4mjpgRTCsU=", "owner": "nix-community", "repo": "home-manager", - "rev": "342a1d682386d3a1d74f9555cb327f2f311dda6e", + "rev": "65ae9c147349829d3df0222151f53f79821c5134", "type": "github" }, "original": { @@ -562,6 +562,32 @@ "url": "https://git.fainsin.bzh/ENSEEIHT/projet-audionumerique" } }, + "projet-fin-etude": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1728676620, + "narHash": "sha256-iWbq4eeW+EAxfRBPCLD8rvAs7ah9rE0DvXK1osd02Qg=", + "ref": "refs/heads/master", + "rev": "098426d12cb0ec3c60462ed99f4101eede35df52", + "revCount": 58, + "type": "git", + "url": "https://git.fainsin.bzh/ENSEEIHT/projet-fin-etude-rapport" + }, + "original": { + "type": "git", + "url": "https://git.fainsin.bzh/ENSEEIHT/projet-fin-etude-rapport" + } + }, "projet-intelligence-artificielle-multimedia": { "inputs": { "flake-parts": [ @@ -736,6 +762,7 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "projet-audionumerique": "projet-audionumerique", + "projet-fin-etude": "projet-fin-etude", "projet-intelligence-artificielle-multimedia": "projet-intelligence-artificielle-multimedia", "projet-modelisation-geometrique": "projet-modelisation-geometrique", "projet-oral-anglais": "projet-oral-anglais", diff --git a/flake.nix b/flake.nix index c2953a3..c806fe8 100644 --- a/flake.nix +++ b/flake.nix @@ -111,6 +111,12 @@ inputs.flake-parts.follows = "flake-parts"; inputs.systems.follows = "systems"; }; + projet-fin-etude = { + url = "git+https://git.fainsin.bzh/ENSEEIHT/projet-fin-etude-rapport"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-parts.follows = "flake-parts"; + inputs.systems.follows = "systems"; + }; TP-calcul-parallele = { url = "git+https://git.fainsin.bzh/ENSEEIHT/TP-calcul-parallele"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/cesium/services/nginx/n7/projet-fin-etude.nix b/hosts/cesium/services/nginx/n7/projet-fin-etude.nix index 1783bbb..a240fbd 100644 --- a/hosts/cesium/services/nginx/n7/projet-fin-etude.nix +++ b/hosts/cesium/services/nginx/n7/projet-fin-etude.nix @@ -1,19 +1,18 @@ { - pkgs, + inputs, + system, vhost, location, ... -}: let - pages = pkgs.fetchgit { - url = "https://git.fainsin.bzh/ENSEEIHT/projet-fin-etude-rapport"; - rev = "32fe5c7ec6d67241951fdaf001e3da1c41b29dcf"; # pages - sha256 = "sha256-pOu0lohJ1Yqg/a5hqnNTePTrU8t5By5AbhUAJfL5MBg="; - }; -in { - services.nginx.virtualHosts.${vhost}.locations."/${location}/" = { - alias = "${pages}/"; - index = "index.html"; - tryFiles = "$uri $uri/ /${location}/index.html"; +}: { + services.nginx.virtualHosts.${vhost}.locations = { + "/${location}/" = { + alias = inputs.projet-fin-etude.packages.${system}.slides + "/"; + tryFiles = "$uri $uri/ /${location}/index.html"; + }; + "=/${location}/rapport.pdf" = { + alias = inputs.projet-fin-etude.packages.${system}.report + "/paper.pdf"; + }; }; services.gatus.settings.endpoints = [