diff options
Diffstat (limited to 'makefu/2configs')
-rw-r--r-- | makefu/2configs/nix-community/mediawiki-matrix-bot.nix | 23 | ||||
-rw-r--r-- | makefu/2configs/tools/dev.nix | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/makefu/2configs/nix-community/mediawiki-matrix-bot.nix b/makefu/2configs/nix-community/mediawiki-matrix-bot.nix new file mode 100644 index 000000000..6dff64121 --- /dev/null +++ b/makefu/2configs/nix-community/mediawiki-matrix-bot.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: +let + seccfg = toString <secrets/mediawikibot-config.json>; + statecfg = "/var/lib/mediawiki-matrix-bot/config.json"; +in { + systemd.services.mediawiki-matrix-bot = { + description = "Mediawiki Matrix Bot"; + after = [ "network-online.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Restart = "always"; + RestartSec = "60s"; + DynamicUser = true; + StateDirectory = "mediawiki-matrix-bot"; + PermissionsStartOnly = true; + ExecStartPre = pkgs.writeDash "mediawikibot-copy-config" '' + install -D -m644 ${seccfg} ${statecfg} + ''; + ExecStart = "${pkgs.mediawiki-matrix-bot}/bin/mediawiki-matrix-bot ${statecfg}"; + PrivateTmp = true; + }; + }; +} diff --git a/makefu/2configs/tools/dev.nix b/makefu/2configs/tools/dev.nix index ac6d91e85..36f867559 100644 --- a/makefu/2configs/tools/dev.nix +++ b/makefu/2configs/tools/dev.nix @@ -33,6 +33,7 @@ cac-api cac-panel krebszones + cyberlocker-tools ovh-zone gen-oath-safe cdrtools |