mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
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>
This commit is contained in:
parent
5519e1b89b
commit
c231a20d98
@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user