Commit 8e08ceadc55f

Vincent Demeester <vincent@sbr.pm>
2020-05-10 00:00:37
machines/sakhalin: add a daily builds.sr.ht ๐Ÿ•š
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 9172fc8
Changed files (2)
machines/sakhalin.nixos.nix
@@ -104,6 +104,28 @@ with import ../assets/machines.nix; {
       OnFailure = "status-email-root@%n.service";
     };
   };
+  # builds.sr.ht: daily builds
+  systemd.services.builds-srht = {
+    description = "Daily builds.sr.ht";
+    requires = [ "network-online.target" ];
+    after = [ "network-online.target" ];
+
+    restartIfChanged = false;
+    unitConfig.X-StopOnRemoval = false;
+
+    serviceConfig = {
+      Type = "oneshot";
+      User = "vincent";
+      OnFailure = "status-email-root@%n.service";
+    };
+
+    path = with pkgs; [ httpie ];
+    script = ''
+      http POST https://builds.sr.ht/api/jobs manifest="$(cat /etc/nixos/.builds/nixos.yml)" Authorization:"token ${token_srht}"
+    '';
+
+    startAt = "daily";
+  };
   # ape โ€“ sync git mirrors
   systemd.services.ape = {
     description = "Ape - sync git mirrors";
tasks.org
@@ -220,7 +220,11 @@
 
 * TODO Handle machines.nix better (somehow?)
 
-* TODO [#A] Update auto-update service
+* DONE [#A] Update auto-update service
+CLOSED: [2020-05-09 Sat 22:51]
+:LOGBOOK:
+- State "DONE"       from "TODO"       [2020-05-09 Sat 22:51]
+:END:
 
 Make it simpler
 - auto-update simple
@@ -293,7 +297,7 @@
 
 Daily or weekly build
 
-* TODO [#A] self-contained configuration
+* TODO [#B] self-contained configuration
 
 - Pin different channels in the configuration (?)
 - Run the configuration against multiple channels (?)