Cleanups
This commit is contained in:
parent
b108198dc0
commit
0210da091d
@ -10,36 +10,33 @@ let
|
|||||||
nanopos = import pkgs/nanopos.nix { inherit pkgs; };
|
nanopos = import pkgs/nanopos.nix { inherit pkgs; };
|
||||||
liquidd = import pkgs/liquidd.nix;
|
liquidd = import pkgs/liquidd.nix;
|
||||||
in {
|
in {
|
||||||
|
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./modules/nixbitcoin.nix
|
./modules/nixbitcoin.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Turn off binary cache by setting binaryCaches to empty list
|
# Turn off binary cache by setting binaryCaches to empty list
|
||||||
# nix.binaryCaches = [];
|
# nix.binaryCaches = [];
|
||||||
|
|
||||||
networking.hostName = "nix-bitcoin"; # Define your hostname.
|
|
||||||
time.timeZone = "UTC";
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
vim tmux
|
|
||||||
htop
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
inherit nodeinfo;
|
inherit nodeinfo;
|
||||||
inherit lightning-charge;
|
inherit lightning-charge;
|
||||||
inherit nanopos;
|
inherit nanopos;
|
||||||
liquidd = (pkgs.callPackage liquidd { });
|
liquidd = (pkgs.callPackage liquidd { });
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh.enable = true;
|
|
||||||
networking.firewall.enable = true;
|
|
||||||
services.nixbitcoin.enable = true;
|
services.nixbitcoin.enable = true;
|
||||||
# Install and use minimal or all modules
|
# Install and use minimal or all modules
|
||||||
services.nixbitcoin.modules = "all";
|
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
|
# This value determines the NixOS release with which your system is to be
|
||||||
# compatible, in order to avoid breaking some software such as database
|
# compatible, in order to avoid breaking some software such as database
|
||||||
# servers. You should change this only after NixOS release notes say you
|
# servers. You should change this only after NixOS release notes say you
|
||||||
|
@ -82,6 +82,11 @@ in {
|
|||||||
default = "/var/lib/bitcoind";
|
default = "/var/lib/bitcoind";
|
||||||
description = "The data directory for bitcoind.";
|
description = "The data directory for bitcoind.";
|
||||||
};
|
};
|
||||||
|
configFileOption = mkOption {
|
||||||
|
type = types.path;
|
||||||
|
default = configFile;
|
||||||
|
description = "The data directory for bitcoind.";
|
||||||
|
};
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
@ -186,7 +191,7 @@ in {
|
|||||||
mkdir -m 0770 -p '${cfg.dataDir}'
|
mkdir -m 0770 -p '${cfg.dataDir}'
|
||||||
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}'
|
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}'
|
||||||
fi
|
fi
|
||||||
cp '${configFile}' '${cfg.dataDir}/bitcoin.conf'
|
cp '${cfg.configFileOption}' '${cfg.dataDir}/bitcoin.conf'
|
||||||
chmod o-rw '${cfg.dataDir}/bitcoin.conf'
|
chmod o-rw '${cfg.dataDir}/bitcoin.conf'
|
||||||
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}/bitcoin.conf'
|
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}/bitcoin.conf'
|
||||||
echo "rpcpassword=$(cat /secrets/bitcoin-rpcpassword)" >> '${cfg.dataDir}/bitcoin.conf'
|
echo "rpcpassword=$(cat /secrets/bitcoin-rpcpassword)" >> '${cfg.dataDir}/bitcoin.conf'
|
||||||
|
@ -21,7 +21,6 @@ let
|
|||||||
in {
|
in {
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
# Tor module from nixpkgs but with HiddenService v3
|
|
||||||
./bitcoind.nix
|
./bitcoind.nix
|
||||||
./clightning.nix
|
./clightning.nix
|
||||||
./lightning-charge.nix
|
./lightning-charge.nix
|
||||||
|
Loading…
Reference in New Issue
Block a user