cleanups
This commit is contained in:
parent
986217d5d3
commit
63e2c6d270
@ -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
|
||||||
|
@ -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";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user