Skip to content

Instantly share code, notes, and snippets.

@jaoleal
Last active November 20, 2024 20:24
Show Gist options
  • Select an option

  • Save jaoleal/53c34c15e80b9ad1cf28174db97ec08a to your computer and use it in GitHub Desktop.

Select an option

Save jaoleal/53c34c15e80b9ad1cf28174db97ec08a to your computer and use it in GitHub Desktop.
{
description = "Nix flake for solving Vinteum challenges";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = { self, nixpkgs }:
let
supportedSystems = [
"x86_64-linux"
];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
# The Nix packages provided in the environment
# Add any you need here
packages = with pkgs; [ jq bitcoin ];
# Coloque seu login aqui.
env = {
CRPC_USER = "user_666";
CRPC_PASSWORD = "^^^^^^^^^";
CRPC_IP = "84.247.182.145";
};
shellHook = ''
rm -rf ~/.bitcoin/bitcoin.conf
touch ~/.bitcoin/bitcoin.conf
echo "rpcconnect=84.247.182.145" >> ~/.bitcoin/bitcoin.conf
echo "rpcuser=classroom" >> ~/.bitcoin/bitcoin.conf
echo "rpcpassword=R4uo1NgQGuFx" >> ~/.bitcoin/bitcoin.conf
'';
};
});
};
}
@jaoleal
Copy link
Author

jaoleal commented Nov 20, 2024

So atualizar seus dados de login e executar $nix develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment