mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
fixed bitcoin core? added test pass
This commit is contained in:
parent
c4aaf582c6
commit
10c4a97fe1
2 changed files with 16 additions and 28 deletions
|
|
@ -10,11 +10,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.mutableUsers = false;
|
||||||
users.users = {
|
users.users = {
|
||||||
${config.user.name} = {
|
${config.user.name} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = config.user.groups;
|
extraGroups = config.user.groups;
|
||||||
openssh.authorizedKeys.keys = [ "${config.user.sshKeys.key1}" ];
|
openssh.authorizedKeys.keys = [ "${config.user.sshKeys.key1}" ];
|
||||||
|
initialPassword = "123";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, config, autoreconfHook, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
|
|
@ -13,30 +13,21 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
bitcoind = prev.stdenv.mkDerivation rec {
|
bitcoind = prev.bitcoind.overrideAttrs (old: {
|
||||||
pname = "bitcoind";
|
|
||||||
version = "27.0";
|
version = "27.0";
|
||||||
|
|
||||||
src = fetchTarball {
|
src = fetchTarball {
|
||||||
url = "https://bitcoincore.org/bin/bitcoin-core-${version}/bitcoin-${version}-x86_64-linux-gnu.tar.gz";
|
url = "https://github.com/bitcoin/bitcoin/archive/refs/tags/v${version}.tar.gz";
|
||||||
sha256 = "sha256-T45mgVrGXEZIz9mPbVd4feca6qKzOuJqXDaLzFv+JBY=";
|
sha256 = "sha256-U2tR3WySD3EssA3a14wUtA3e0t/5go0isqNZSSma7m4=";
|
||||||
};
|
|
||||||
|
|
||||||
phase = [ "unpackPhase" "installPhase" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp bin/* $out/bin
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
});
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
users = {
|
users = {
|
||||||
"bitcoind" = {
|
"btc" = {
|
||||||
inherit home;
|
inherit home;
|
||||||
description = "bitcoind system user";
|
description = "Bitcoin Core system user";
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "bitcoin";
|
group = "bitcoin";
|
||||||
createHome = true;
|
createHome = true;
|
||||||
|
|
@ -45,29 +36,24 @@ in
|
||||||
groups = {
|
groups = {
|
||||||
"bitcoin" = {
|
"bitcoin" = {
|
||||||
members = [
|
members = [
|
||||||
"bitcoind"
|
"btc"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.bash.shellAliases = {
|
||||||
|
btc = "bitcoind";
|
||||||
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 8333 ];
|
networking.firewall.allowedTCPPorts = [ 8333 ];
|
||||||
|
|
||||||
services.bitcoind = {
|
services.bitcoind = {
|
||||||
"bitcoind" = {
|
"btc" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "bitcoind";
|
user = "btc";
|
||||||
group = "bitcoin";
|
group = "bitcoin";
|
||||||
configFile = conf;
|
configFile = conf;
|
||||||
|
|
||||||
rpc = {
|
|
||||||
port = 8332;
|
|
||||||
#users = {
|
|
||||||
# config.user.name = {
|
|
||||||
# passwordHMAC = "";
|
|
||||||
# };
|
|
||||||
#};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue