non-working tor support
This commit is contained in:
parent
18dc2304c0
commit
d943e11647
@ -18,6 +18,8 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
services.tor.enable = true;
|
||||||
|
services.tor.client.enable = true;
|
||||||
|
|
||||||
# users.users.root = {
|
# users.users.root = {
|
||||||
# openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILacgZRwLsiICNHGHY2TG2APeuxFsrw6Cg13ZTMQpNqA nickler@rick" ];
|
# openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILacgZRwLsiICNHGHY2TG2APeuxFsrw6Cg13ZTMQpNqA nickler@rick" ];
|
||||||
|
@ -4,7 +4,14 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.bitcoin;
|
cfg = config.services.bitcoin;
|
||||||
datadir = "/var/lib/bitcoin";
|
home = "/var/lib/bitcoin";
|
||||||
|
configFile = pkgs.writeText "bitcoin.conf" ''
|
||||||
|
listen=0
|
||||||
|
onlynet=onion
|
||||||
|
prune=1001
|
||||||
|
assumevalid=0000000000000000000726d186d6298b5054b9a5c49639752294b322a305d240
|
||||||
|
proxy=127.0.0.1:9050
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
options.services.bitcoin = {
|
options.services.bitcoin = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
@ -19,16 +26,21 @@ in {
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
users.users.bitcoin =
|
users.users.bitcoin =
|
||||||
{
|
{
|
||||||
description = "Tor Daemon User";
|
description = "Bitcoind User";
|
||||||
createHome = true;
|
createHome = true;
|
||||||
home = datadir;
|
inherit home;
|
||||||
};
|
};
|
||||||
systemd.services.bitcoind =
|
systemd.services.bitcoind =
|
||||||
{ description = "Run bitcoind";
|
{ description = "Run bitcoind";
|
||||||
path = [ pkgs.bitcoin ];
|
path = [ pkgs.bitcoin ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
preStart = ''
|
||||||
|
mkdir -p ${home}/.bitcoin
|
||||||
|
ln -sf ${configFile} ${home}/.bitcoin/bitcoin.conf
|
||||||
|
'';
|
||||||
serviceConfig =
|
serviceConfig =
|
||||||
{ ExecStart = "${pkgs.bitcoin}/bin/bitcoind -datadir=${datadir}";
|
{
|
||||||
|
ExecStart = "${pkgs.bitcoin}/bin/bitcoind";
|
||||||
User = "bitcoin";
|
User = "bitcoin";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user