mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
ef176dcf7e
conversions were done using https://github.com/pennae/nix-doc-munge using (probably) rev f34e145 running nix-doc-munge nixos/**/*.nix nix-doc-munge --import nixos/**/*.nix the tool ensures that only changes that could affect the generated manual *but don't* are committed, other changes require manual review and are discarded.
29 lines
781 B
Nix
29 lines
781 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.services.magic-wormhole-mailbox-server;
|
|
dataDir = "/var/lib/magic-wormhole-mailbox-server;";
|
|
python = pkgs.python3.withPackages (py: [ py.magic-wormhole-mailbox-server py.twisted ]);
|
|
in
|
|
{
|
|
options.services.magic-wormhole-mailbox-server = {
|
|
enable = mkEnableOption (lib.mdDoc "Enable Magic Wormhole Mailbox Server");
|
|
};
|
|
|
|
config = 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;
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|