From 9b6c2fdc3e5493dfda4badebe6045a65dd40c782 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Tue, 14 Jan 2025 18:06:19 -0600 Subject: [PATCH] bert: Add bannergen --- .../http/bannergen.chandlerswift.com.nix | 28 +++++++++++++++++++ bert/services/http/index.nix | 1 + 2 files changed, 29 insertions(+) create mode 100644 bert/services/http/bannergen.chandlerswift.com.nix diff --git a/bert/services/http/bannergen.chandlerswift.com.nix b/bert/services/http/bannergen.chandlerswift.com.nix new file mode 100644 index 0000000..8863ae7 --- /dev/null +++ b/bert/services/http/bannergen.chandlerswift.com.nix @@ -0,0 +1,28 @@ +{ config, pkgs, lib, ... }: +let + bannergen = pkgs.buildGoModule { + pname = "bannergen"; + version = "0.1.0"; + src = pkgs.fetchgit { + url = "https://git.chandlerswift.com/chandlerswift/bannergen"; + rev = "4f277239206e3df49a22306ce4a9f3bc8d738905"; + sha256 = "sha256-4u8nUFUio4SlpdQB1oYg8Hbem0eBfKt5GSFOUmoVdz4="; + }; + vendorHash = "sha256-yKZdNhNyUOqywLy/RDjcziJ0FfrpuNcNMwyUAnRov60="; + }; +in +{ + systemd.services.bannergen = { + enable = true; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + ExecStart = "${bannergen}/bin/bannergen"; + Restart = "on-failure"; + }; + }; + + services.caddy.virtualHosts."bannergen.chandlerswift.com".extraConfig = '' + reverse_proxy localhost:8000 + ''; +} diff --git a/bert/services/http/index.nix b/bert/services/http/index.nix index fae2c7b..b6cb723 100644 --- a/bert/services/http/index.nix +++ b/bert/services/http/index.nix @@ -1,6 +1,7 @@ { imports = [ ./0hats.com.nix + ./bannergen.chandlerswift.com.nix ./files.chandlerswift.com.nix ./git.chandlerswift.com.nix ./harborpaperco.com.nix