19 lines
569 B
Nix
19 lines
569 B
Nix
{ lib, pkgs, config, ... }:
|
|
let
|
|
cfg = config.services.gmail_mail_bridge;
|
|
appEnv = pkgs.python3.withPackages (p: with p; [ waitress (callPackage ./bridge/default.nix {}) ]);
|
|
in {
|
|
options.services.gmail_mail_bridge = {
|
|
enable = lib.mkEnableOption "Enable the Gitea-Github bridge";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
systemd.services.gmail_mail_bridge = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
serviceConfig = {
|
|
ExecStart = "${appEnv}/bin/waitress-serve --port=8041 bridge:app";
|
|
StandardOutput = "journal";
|
|
};
|
|
};
|
|
};
|
|
} |