From 8f5414c285d85d88e8a0456aef80766456a952e5 Mon Sep 17 00:00:00 2001 From: Astro Date: Sat, 18 Jun 2022 02:55:11 +0200 Subject: [PATCH] c3d2-web: fix deploy-c3d2-web.service --- hosts/containers/c3d2-web/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hosts/containers/c3d2-web/default.nix b/hosts/containers/c3d2-web/default.nix index 3050e821..befd2c94 100644 --- a/hosts/containers/c3d2-web/default.nix +++ b/hosts/containers/c3d2-web/default.nix @@ -154,7 +154,11 @@ in # Build script systemd.services.deploy-c3d2-web = { wantedBy = [ "multi-user.target" ]; - path = with pkgs; [ git nix curl ]; + after = [ "network-online.target" ]; + path = with pkgs; [ + git nix curl + libxslt libxml2 wget rsync gnumake bash + ]; script = '' # Build at least once touch ${config.users.users.c3d2-web.home}/deploy-pending @@ -166,6 +170,7 @@ in cd c3d2-web git fetch origin git reset --hard origin/master + git clean -d -f -x fi # Loop in case the webhook was called while we were building @@ -182,9 +187,7 @@ in -H "Content-Type: application/json" \ -d "{ \"context\": \"c3d2-web\", \"description\": \"building...\", \"state\": \"pending\", \"target_url\": \"https://c3d2-web.serv.zentralwerk.org/log/build-$REV.txt\"}" - nix-shell shell.nix \ - -I nixpkgs=${nixpkgs} \ - --run "make -j$(nproc) export DESTDIR=${webroot}/c3d2" \ + make -j$(nproc) export DESTDIR=${webroot}/c3d2 \ 2>&1 \ >${webroot}/log/build-$REV.txt @@ -207,9 +210,7 @@ in -H "Content-Type: application/json" \ -d "{ \"context\": \"c3d2-gemini\", \"description\": \"building...\", \"state\": \"pending\", \"target_url\": \"https://c3d2-web.serv.zentralwerk.org/log/build-gemini-$REV.txt\"}" - nix-shell shell.nix \ - -I nixpkgs=${nixpkgs} \ - --run "make -f Makefile.gemini -j$(nproc) export DESTDIR=${geminiRoot}" \ + make -f Makefile.gemini -j$(nproc) export DESTDIR=${geminiRoot} \ 2>&1 \ >${webroot}/log/build-gemini-$REV.txt