From 0c50c136f6c0bf332f167bc71be8ff6c30e31571 Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Tue, 6 Jun 2023 08:35:25 -0700 Subject: [PATCH] nixos/lemmy: reduce moving parts (cherry picked from commit a3527512d7a9fbad6a20aab6eacfcae101028757) --- nixos/modules/services/web-apps/lemmy.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/services/web-apps/lemmy.nix b/nixos/modules/services/web-apps/lemmy.nix index fce9b0b7ae5a..af921bae6597 100644 --- a/nixos/modules/services/web-apps/lemmy.nix +++ b/nixos/modules/services/web-apps/lemmy.nix @@ -167,7 +167,7 @@ in description = "Lemmy server"; environment = { - LEMMY_CONFIG_LOCATION = "/run/lemmy/config.hjson"; + LEMMY_CONFIG_LOCATION = "${settingsFormat.generate "config.hjson" cfg.settings}"; LEMMY_DATABASE_URL = mkIf (cfg.database.uri != null) cfg.database.uri; }; @@ -185,7 +185,6 @@ in serviceConfig = { DynamicUser = true; RuntimeDirectory = "lemmy"; - ExecStartPre = "${pkgs.coreutils}/bin/install -m 600 ${settingsFormat.generate "config.hjson" cfg.settings} /run/lemmy/config.hjson"; ExecStart = "${cfg.server.package}/bin/lemmy_server"; }; };