This commit is contained in:
Bryan Ramos 2025-07-06 01:02:30 -04:00
parent 1d99368b0a
commit 433dac83d8
Signed by: bryan
GPG key ID: 6ABDCD144D6643C8
3 changed files with 24 additions and 18 deletions

View file

@ -7,11 +7,6 @@ let
home = "/var/lib/bitcoind";
bitcoinConf = pkgs.writeTextFile {
name = "bitcoin.conf";
text = builtins.readFile ./config/bitcoin.conf;
};
in
{ options.modules.system.bitcoin = { enable = mkEnableOption "Bitcoin Server"; };
config = mkIf cfg.enable {
@ -36,7 +31,7 @@ in
group = "bitcoin";
createHome = true;
};
"nginx" = {
"${config.services.nginx.user}" = {
extraGroups = mkIf nginx.enable [
"bitcoin"
];
@ -60,7 +55,7 @@ in
enable = true;
user = "btc";
group = "bitcoin";
configFile = bitcoinConf;
configFile = ./config/bitcoin.conf;
dataDir = home;
pidFile = "${home}/bitcoind.pid";
};