mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
trezord: adding emultor support
This commit is contained in:
parent
53e8129017
commit
5712bea91b
1 changed files with 17 additions and 1 deletions
|
@ -16,6 +16,22 @@ in {
|
|||
Enable Trezor bridge daemon, for use with Trezor hardware bitcoin wallets.
|
||||
'';
|
||||
};
|
||||
|
||||
emulator.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable Trezor emulator support.
|
||||
'';
|
||||
};
|
||||
|
||||
emulator.port = mkOption {
|
||||
type = types.port;
|
||||
default = 21324;
|
||||
description = ''
|
||||
Listening port for the Trezor emulator.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -44,7 +60,7 @@ in {
|
|||
path = [];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.trezord}/bin/trezord-go";
|
||||
ExecStart = "${pkgs.trezord}/bin/trezord-go ${optionalString cfg.emulator.enable "-e ${builtins.toString cfg.emulator.port}"}";
|
||||
User = "trezord";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue