diff options
author | Brian Leung <leungbk@posteo.net> | 2022-09-12 01:54:27 -0700 |
---|---|---|
committer | Yt <happysalada@proton.me> | 2022-09-12 18:39:54 -0400 |
commit | c231a20d98ec8b7cc521c490ab9d957c9778fa0a (patch) | |
tree | 187c7f7b658bd04698b748022139bba5236eefb6 /nixos | |
parent | 5519e1b89bf02443b056fac9acf5f6d607bb622f (diff) |
nixos/lemmy: move systemd script to serviceConfig
Co-authored-by: Shahar Dawn Or <mightyiampresence@gmail.com> Co-authored-by: Ctem <c@ctem.me> Co-authored-by: Ilan Joselevich <personal@ilanjoselevich.com> Co-authored-by: a-kenji <aks.kenji@protonmail.com>
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-apps/lemmy.nix | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/nixos/modules/services/web-apps/lemmy.nix b/nixos/modules/services/web-apps/lemmy.nix index 1945c82914335..7f619489893ef 100644 --- a/nixos/modules/services/web-apps/lemmy.nix +++ b/nixos/modules/services/web-apps/lemmy.nix @@ -167,14 +167,11 @@ in requires = lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ]; - script = '' - ${pkgs.coreutils}/bin/install -m 600 ${settingsFormat.generate "config.hjson" cfg.settings} /run/lemmy/config.hjson - ${pkgs.lemmy-server}/bin/lemmy_server - ''; - serviceConfig = { DynamicUser = true; RuntimeDirectory = "lemmy"; + ExecStartPre = "${pkgs.coreutils}/bin/install -m 600 ${settingsFormat.generate "config.hjson" cfg.settings} /run/lemmy/config.hjson"; + ExecStart = "${pkgs.lemmy-server}/bin/lemmy_server"; }; }; |