dynix/modules/dynamicism/gotosocial.nix

25 lines
690 B
Nix
Raw Permalink Normal View History

# SPDX-FileCopyrightText: 2026 Qyriad <qyriad@qyriad.me>
#
# SPDX-License-Identifier: EUPL-1.1
2026-02-10 14:19:55 +01:00
{ pkgs, lib, config, ... }:
let
settingsFormat = pkgs.formats.yaml { };
2026-02-10 14:59:44 +01:00
configFile = settingsFormat.generate "gotosocial-override.yml" config.services.gotosocial.settings;
2026-02-10 14:19:55 +01:00
in
{
dynamicism.for.gotosocial = {
source-options = [ "services.gotosocial.settings" ];
2026-02-10 14:59:44 +01:00
unitDropins."gotosocial.service" = pkgs.writeTextFile {
name = "gotosocial-override.conf";
text = ''
[Service]
ExecStart=
2026-02-16 18:02:39 +01:00
ExecStart=${lib.getExe' pkgs.gotosocial "gotosocial"} --config-path ${configFile} server start
2026-02-10 14:59:44 +01:00
'';
passthru = { inherit configFile; };
};
2026-02-10 14:19:55 +01:00
};
}