mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
v2
This commit is contained in:
parent
036db0b3b9
commit
203170a88f
66 changed files with 169 additions and 54 deletions
45
src/system/modules/bitcoin/default.nix
Normal file
45
src/system/modules/bitcoin/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.bitcoin;
|
||||
|
||||
in
|
||||
{ options.modules.bitcoin = { enable = mkEnableOption "bitcoin"; };
|
||||
|
||||
imports = [
|
||||
./core-lightning
|
||||
./sparrow-cli
|
||||
];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.bash.shellAliases = {
|
||||
btc = "bitcoin-cli";
|
||||
};
|
||||
|
||||
users = {
|
||||
users = {
|
||||
"bitcoind" = {
|
||||
description = "bitcoind system user";
|
||||
isSystemUser = true;
|
||||
group = "bitcoin";
|
||||
};
|
||||
};
|
||||
groups = {
|
||||
"bitcoin" = {
|
||||
members = [ "clightning" "electrs" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.bitcoind = {
|
||||
"bitcoind" = {
|
||||
enable = true;
|
||||
testnet = false;
|
||||
user = "bitcoind";
|
||||
group = "bitcoin";
|
||||
#extraConfig = TODO;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue