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

View File

@ -3,14 +3,14 @@
with lib;
let
cfg = config.services.onionnode;
cfg = config.services.nixbitcoin;
in {
options.services.onionnode = {
options.services.nixbitcoin = {
enable = mkOption {
type = types.bool;
default = false;
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;
};
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";
};
};
};
}