mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
added and connected bitcoin core system module
This commit is contained in:
parent
553961b831
commit
1fe6ccb729
4 changed files with 83 additions and 10 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{ system.stateVersion = "23.11";
|
||||
|
||||
imports = [ ../modules ];
|
||||
imports = [ ../../modules ];
|
||||
|
||||
users.users = {
|
||||
${config.user.name} = {
|
||||
|
|
|
|||
68
src/system/modules/bitcoin/default.nix
Normal file
68
src/system/modules/bitcoin/default.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.bitcoin;
|
||||
version = "27.0";
|
||||
|
||||
home = /var/lib/bitcoind;
|
||||
#conf = pkgs.writeText "bitcoin.conf" (import ./config);
|
||||
|
||||
|
||||
in
|
||||
{ options.modules.system.bitcoin = { enable = mkEnableOption "system.bitcoin"; };
|
||||
config = mkIf cfg.enable {
|
||||
#nixpkgs.overlays = [
|
||||
# (final: prev: {
|
||||
# bitcoind = prev.bitcoind.overrideAttrs (old: {
|
||||
# src = fetchTarball {
|
||||
# url = ''
|
||||
# https://bitcoincore.org/bin/bitcoin-core-${version}/bitcoin-${version}-x86_64-linux-gnu.tar.gz
|
||||
# '';
|
||||
# sha256 = ''
|
||||
# sha256-05i4zrdwr2rnbimf4fmklbm1mrvxg1bnv3yrrx44cp66ba0nd3jg
|
||||
# '';
|
||||
# };
|
||||
# });
|
||||
# })
|
||||
#];
|
||||
|
||||
users = {
|
||||
users = {
|
||||
"bitcoind" = {
|
||||
inherit home;
|
||||
description = "bitcoind system user";
|
||||
isSystemUser = true;
|
||||
group = "bitcoin";
|
||||
createHome = true;
|
||||
};
|
||||
};
|
||||
#groups = {
|
||||
# "bitcoin" = {
|
||||
# members = [
|
||||
# ];
|
||||
# };
|
||||
#};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 8333 ];
|
||||
|
||||
services.bitcoind = {
|
||||
"bitcoind" = {
|
||||
enable = true;
|
||||
user = "bitcoind";
|
||||
group = "bitcoin";
|
||||
#configFile = conf;
|
||||
|
||||
rpc = {
|
||||
port = 8332;
|
||||
#users = {
|
||||
# config.user.name = {
|
||||
# passwordHMAC = "";
|
||||
# };
|
||||
#};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
src/system/modules/default.nix
Normal file
5
src/system/modules/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./bitcoin
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue