diff --git a/configuration.nix b/configuration.nix index f943098..eb7ede3 100644 --- a/configuration.nix +++ b/configuration.nix @@ -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 diff --git a/modules/bitcoind.nix b/modules/bitcoind.nix index 414c33c..2277f4f 100644 --- a/modules/bitcoind.nix +++ b/modules/bitcoind.nix @@ -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' diff --git a/modules/nixbitcoin.nix b/modules/nixbitcoin.nix index 326337b..a952869 100644 --- a/modules/nixbitcoin.nix +++ b/modules/nixbitcoin.nix @@ -21,7 +21,6 @@ let in { imports = [ - # Tor module from nixpkgs but with HiddenService v3 ./bitcoind.nix ./clightning.nix ./lightning-charge.nix