summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2023-09-12 20:52:02 +0200
committerLinnnus <[email protected]>2023-09-12 20:52:02 +0200
commit3ac6c7ab0719183d838f1cbef1173fb75424d9f4 (patch)
tree7c220d1603d2839db32cbc42152b5c9768cd8e89
parent670f67552bbadf207992a541aa020b2f4ee5a17c (diff)
Update linus.onl unit to support new builds sytem
-rw-r--r--modules/linus.onl/default.nix19
1 files changed, 16 insertions, 3 deletions
diff --git a/modules/linus.onl/default.nix b/modules/linus.onl/default.nix
index 076f7c1..f65bf0b 100644
--- a/modules/linus.onl/default.nix
+++ b/modules/linus.onl/default.nix
@@ -60,18 +60,31 @@ in
};
startAt = "*-*-* *:00/5:00";
- path = with pkgs; [ git tcl smu rsync ];
+ path = with pkgs; [
+ git
+ rsync
+ coreutils-full
+ tcl-8_5
+ gnumake
+ ];
+ environment.TCLLIBPATH = "$TCLLIBPATH ${pkgs.tcl-cmark}/lib/tclcmark1.0";
script = ''
set -ex
- cd $(mktemp -d -t linus.onl-source.XXXXXXXXXXXX)
+ tmpdir="$(mktemp -d -t linus.onl-source.XXXXXXXXXXXX)"
+ cd "$tmpdir"
+ trap 'rm -rf $tmpdir' EXIT
# TODO: Only do minimal possible cloning
git clone https://github.com/linnnus/${domain} .
- tclsh build.tcl
+ make _build
rsync --archive --delete _build/ /var/www/${domain}
'';
# TODO: Harden service
+ # Network must be online for us to check.
+ after = [ "network-online.target" ];
+ requires = [ "network-online.target" ];
+
# We must generate some files for NGINX to serve, so this should be run
# before NGINX.
before = [ "nginx.service" ];