mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
a85c314882
magic-wormhole-mailbox-server is not yet supported with Python 3.12. https://github.com/magic-wormhole/magic-wormhole-mailbox-server/issues/41
38 lines
902 B
Nix
38 lines
902 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.services.magic-wormhole-mailbox-server;
|
|
# keep semicolon in dataDir for backward compatibility
|
|
dataDir = "/var/lib/magic-wormhole-mailbox-server;";
|
|
python = pkgs.python311.withPackages (
|
|
py: with py; [
|
|
magic-wormhole-mailbox-server
|
|
twisted
|
|
]
|
|
);
|
|
in
|
|
{
|
|
options.services.magic-wormhole-mailbox-server = {
|
|
enable = lib.mkEnableOption "Magic Wormhole Mailbox Server";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
systemd.services.magic-wormhole-mailbox-server = {
|
|
after = [ "network.target" ];
|
|
wantedBy = [ "multi-user.target" ];
|
|
serviceConfig = {
|
|
DynamicUser = true;
|
|
ExecStart = "${python}/bin/twistd --nodaemon wormhole-mailbox";
|
|
WorkingDirectory = dataDir;
|
|
StateDirectory = baseNameOf dataDir;
|
|
};
|
|
};
|
|
};
|
|
|
|
meta.maintainers = [ lib.maintainers.mjoerg ];
|
|
}
|