This commit is contained in:
Jonas Nick 2018-12-06 15:59:41 +00:00
parent b108198dc0
commit 0210da091d
3 changed files with 17 additions and 16 deletions

View File

@ -10,36 +10,33 @@ let
nanopos = import pkgs/nanopos.nix { inherit pkgs; };
liquidd = import pkgs/liquidd.nix;
in {
imports =
[
./modules/nixbitcoin.nix
];
# Turn off binary cache by setting binaryCaches to empty list
# nix.binaryCaches = [];
networking.hostName = "nix-bitcoin"; # Define your hostname.
time.timeZone = "UTC";
environment.systemPackages = with pkgs; [
vim tmux
htop
];
nixpkgs.config.packageOverrides = pkgs: {
inherit nodeinfo;
inherit lightning-charge;
inherit nanopos;
liquidd = (pkgs.callPackage liquidd { });
};
services.openssh.enable = true;
networking.firewall.enable = true;
services.nixbitcoin.enable = true;
# Install and use minimal or all modules
services.nixbitcoin.modules = "all";
# Regular nixos configuration
networking.hostName = "nix-bitcoin"; # Define your hostname.
time.timeZone = "UTC";
services.openssh.enable = true;
networking.firewall.enable = true;
environment.systemPackages = with pkgs; [
vim tmux
htop
];
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you

View File

@ -82,6 +82,11 @@ in {
default = "/var/lib/bitcoind";
description = "The data directory for bitcoind.";
};
configFileOption = mkOption {
type = types.path;
default = configFile;
description = "The data directory for bitcoind.";
};
user = mkOption {
type = types.str;
@ -186,7 +191,7 @@ in {
mkdir -m 0770 -p '${cfg.dataDir}'
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}'
fi
cp '${configFile}' '${cfg.dataDir}/bitcoin.conf'
cp '${cfg.configFileOption}' '${cfg.dataDir}/bitcoin.conf'
chmod o-rw '${cfg.dataDir}/bitcoin.conf'
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}/bitcoin.conf'
echo "rpcpassword=$(cat /secrets/bitcoin-rpcpassword)" >> '${cfg.dataDir}/bitcoin.conf'

View File

@ -21,7 +21,6 @@ let
in {
imports =
[
# Tor module from nixpkgs but with HiddenService v3
./bitcoind.nix
./clightning.nix
./lightning-charge.nix