From f7f8691649ec0c3357383f90b5833742f2357e69 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Mon, 29 May 2023 00:15:19 +0100 Subject: [PATCH] fr24feed: try to bind /etc/fr24feed in instead --- nix/pkgs/fr24feed/default.nix | 8 ++++++-- ops/nixos/totoro/adsb.nix | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/nix/pkgs/fr24feed/default.nix b/nix/pkgs/fr24feed/default.nix index c88f948f9e..b3207485ec 100644 --- a/nix/pkgs/fr24feed/default.nix +++ b/nix/pkgs/fr24feed/default.nix @@ -1,7 +1,7 @@ { stdenv , lib , fetchurl -, buildFHSUserEnv +, buildFHSEnv , bash , writeText }: @@ -23,12 +23,16 @@ let ''; }; in -buildFHSUserEnv { +buildFHSEnv { name = "fr24feed"; targetPkgs = pkgs: with pkgs; [ bash ]; + extraBwrapArgs = [ + "--ro-bind-try /etc/fr24feed /etc/fr24feed" + ]; + runScript = "${bash}/bin/bash ${ writeText "fr24feed" '' diff --git a/ops/nixos/totoro/adsb.nix b/ops/nixos/totoro/adsb.nix index 8cbb372830..487e8e90cb 100644 --- a/ops/nixos/totoro/adsb.nix +++ b/ops/nixos/totoro/adsb.nix @@ -136,7 +136,7 @@ LogsDirectoryMode = "0755"; ConfigurationDirectory = "fr24feed"; ConfigurationDirectoryMode = "0750"; - ExecStart = "${depot.nix.pkgs.fr24feed}/bin/fr24feed --config-file=/host/etc/fr24feed/fr24feed.ini"; + ExecStart = "${depot.nix.pkgs.fr24feed}/bin/fr24feed --config-file=/etc/fr24feed/fr24feed.ini"; Restart = "on-failure"; RestartSec = 30; TimeoutStopSec = 5;