Fixed bitcoin server & modules

This commit is contained in:
Bryan Ramos 2024-11-05 06:48:56 -05:00
parent 6d9d2fe824
commit 290ed823c1
Signed by: bryan
GPG key ID: 6ABDCD144D6643C8
5 changed files with 48 additions and 44 deletions

View file

@ -5,11 +5,14 @@ let
cfg = config.modules.system.bitcoin;
home = "/var/lib/bitcoind";
conf = pkgs.writeText "bitcoin.conf" (import ./config);
bitcoinConf = pkgs.writeTextFile {
name = "bitcoin.conf";
text = builtins.readFile ./config/bitcoin.conf;
};
in
{ options.modules.system.bitcoin = { enable = mkEnableOption "system.bitcoin"; };
{ options.modules.system.bitcoin = { enable = mkEnableOption "Bitcoin Server"; };
imports = [ ./modules ];
config = mkIf cfg.enable {
nixpkgs.overlays = [
@ -38,7 +41,6 @@ in
"bitcoin" = {
members = [
"btc"
"electrs"
];
};
};
@ -55,7 +57,7 @@ in
enable = true;
user = "btc";
group = "bitcoin";
configFile = conf;
configFile = bitcoinConf;
dataDir = home;
pidFile = "${home}/bitcoind.pid";
};