From a99e0309c5b4e0c2c4d0ce1caeb960fff9344b96 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 23 Mar 2021 00:58:18 +0000 Subject: [PATCH] ops/nixos/fup: switch to using config file --- ops/nixos/lib/fup.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ops/nixos/lib/fup.nix b/ops/nixos/lib/fup.nix index cf8c35c71e..44d4fa0b88 100644 --- a/ops/nixos/lib/fup.nix +++ b/ops/nixos/lib/fup.nix @@ -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®ion=london"; + ExecStart = "${pkg}/bin/fup serve --config=${fupConfig}"; DynamicUser = true; }; };