This commit is contained in:
Bryan Ramos 2026-03-12 23:37:20 -04:00
parent 764fa71c44
commit 2423780bc2
2 changed files with 8 additions and 2 deletions

View file

@ -41,13 +41,14 @@ in
"bitcoin" = {
members = [
"btc"
config.user.name
];
};
};
};
programs.bash.shellAliases = {
btc = "bitcoind";
btc = "bitcoin-cli";
};
services.bitcoind = {

View file

@ -47,6 +47,11 @@ in
cln = "lightning-cli";
};
# Symlink for CLI access - allows `lightning-cli` without --lightning-dir
systemd.tmpfiles.rules = mkAfter [
"L+ /home/${config.user.name}/.lightning - - - - ${home}"
];
systemd.services.lightningd = {
description = "Core Lightning Daemon";
wantedBy = [ "multi-user.target" ];
@ -59,7 +64,7 @@ in
];
serviceConfig = {
ExecStartPre = "+${pkgs.coreutils}/bin/chmod 750 /var/lib/bitcoin /var/lib/tor";
ExecStartPre = "+${pkgs.coreutils}/bin/chmod 750 /var/lib/bitcoin /var/lib/tor ${home} ${home}/bitcoin";
ExecStart = "${pkgs.clightning}/bin/lightningd --conf=${clnConfig}";
User = "clightning";
Group = "bitcoin";