gitea-github-sync/contrib/service.nix

19 lines
575 B
Nix
Raw Normal View History

2024-10-08 23:34:31 -05:00
{ lib, pkgs, config, ... }:
let
cfg = config.services.gitea-github-bridge;
appEnv = pkgs.python3.withPackages (p: with p; [ waitress (callPackage ./bridge/default.nix {}) ]);
in {
options.services.gitea-github-bridge = {
enable = lib.mkEnableOption "Enable the Gitea-Github bridge";
};
config = lib.mkIf cfg.enable {
systemd.services.gitea-github-bridge = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${appEnv}/bin/waitress-serve --port=8041 bridge:app";
StandardOutput = "journal";
};
};
};
}