24 lines
690 B
Nix
24 lines
690 B
Nix
# SPDX-FileCopyrightText: 2026 Qyriad <qyriad@qyriad.me>
|
|
#
|
|
# SPDX-License-Identifier: EUPL-1.1
|
|
|
|
{ pkgs, lib, config, ... }:
|
|
let
|
|
settingsFormat = pkgs.formats.yaml { };
|
|
configFile = settingsFormat.generate "gotosocial-override.yml" config.services.gotosocial.settings;
|
|
in
|
|
{
|
|
dynamicism.for.gotosocial = {
|
|
source-options = [ "services.gotosocial.settings" ];
|
|
|
|
unitDropins."gotosocial.service" = pkgs.writeTextFile {
|
|
name = "gotosocial-override.conf";
|
|
text = ''
|
|
[Service]
|
|
ExecStart=
|
|
ExecStart=${lib.getExe' pkgs.gotosocial "gotosocial"} --config-path ${configFile} server start
|
|
'';
|
|
passthru = { inherit configFile; };
|
|
};
|
|
};
|
|
}
|