29 lines
782 B
Nix
29 lines
782 B
Nix
|
{ 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
|
||
|
'';
|
||
|
}
|