ops/nixos/fup: switch to using config file

This commit is contained in:
Luke Granger-Brown 2021-03-23 00:58:18 +00:00
parent 8271714a18
commit a99e0309c5

View file

@ -1,9 +1,12 @@
{ config, options, depot, lib, ... }:
{ config, options, depot, lib, pkgs, ... }:
let
inherit (depot.ops) secrets;
sock = "/run/fup.sock";
pkg = depot.web.fup;
format = pkgs.formats.yaml {};
fupConfig = format.generate "fup.yaml" secrets.fup.config;
in
{
options = with lib; {
@ -69,7 +72,7 @@ in
Type = "simple";
Restart = "always";
EnvironmentFile = secrets.fup.environment;
ExecStart = "${pkg}/bin/fup serve --listen=systemd --root=https://p.lukegb.com/ --bucket-url=s3://public-lukegb-fup?endpoint=objdump.zxcvbnm.ninja&region=london";
ExecStart = "${pkg}/bin/fup serve --config=${fupConfig}";
DynamicUser = true;
};
};