This commit is contained in:
Jonas Nick 2018-11-20 22:21:45 +00:00
parent 986217d5d3
commit 63e2c6d270
4 changed files with 16 additions and 24 deletions

View File

@ -4,16 +4,16 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
# custom package
nodeinfo = (import pkgs/nodeinfo.nix); nodeinfo = (import pkgs/nodeinfo.nix);
in { in {
disabledModules = [ "services/security/tor.nix" ]; disabledModules = [ "services/security/tor.nix" ];
imports = imports =
[ [
./modules/default.nix ./modules/bitcoind.nix
./modules/tor.nix ./modules/tor.nix
./modules/onionnode.nix ./modules/nixbitcoin.nix
./modules/nodeinfo.nix
]; ];
networking.hostName = "nix-bitcoin"; # Define your hostname. networking.hostName = "nix-bitcoin"; # Define your hostname.
@ -42,7 +42,7 @@ in {
services.tor.enable = true; services.tor.enable = true;
services.tor.client.enable = true; services.tor.client.enable = true;
#services.bitcoin.proxy = services.tor.client.socksListenAddress; #services.bitcoin.proxy = services.tor.client.socksListenAddress;
services.onionnode.enable = true; services.nixbitcoin.enable = true;
# turn off binary cache by passing the empty list # turn off binary cache by passing the empty list

View File

@ -3,14 +3,14 @@
with lib; with lib;
let let
cfg = config.services.onionnode; cfg = config.services.nixbitcoin;
in { in {
options.services.onionnode = { options.services.nixbitcoin = {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = ''
If enabled, the onion service will be installed. If enabled, the nix-bitcoin service will be installed.
''; '';
}; };
}; };
@ -28,5 +28,14 @@ in {
}]; }];
version = 3; version = 3;
}; };
systemd.services.nodeinfo = {
description = "Get node info";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.bash}/bin/bash -c ${pkgs.nodeinfo}/bin/nodeinfo";
user = "root";
type = "oneshot";
};
};
}; };
} }

View File

@ -1,17 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
{
config = {
systemd.services.nodeinfo = {
description = "Get node info";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.bash}/bin/bash -c ${pkgs.nodeinfo}/bin/nodeinfo";
user = "root";
type = "oneshot";
};
};
};
}