2021-08-16 01:42:07 -07:00
|
|
|
{
|
|
|
|
description = "A basic nix-bitcoin node";
|
|
|
|
|
2022-05-06 07:45:00 -07:00
|
|
|
inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release";
|
2021-08-16 01:42:07 -07:00
|
|
|
|
|
|
|
outputs = { self, nix-bitcoin }: {
|
|
|
|
|
|
|
|
nixosConfigurations.mynode = nix-bitcoin.inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
2022-06-01 10:59:32 -07:00
|
|
|
nix-bitcoin.nixosModules.default
|
2021-08-16 01:42:07 -07:00
|
|
|
|
2021-12-27 07:58:15 -08:00
|
|
|
# Optional:
|
|
|
|
# Import the secure-node preset, an opinionated config to enhance security
|
|
|
|
# and privacy.
|
2021-08-16 01:42:07 -07:00
|
|
|
#
|
2022-10-22 10:37:47 -07:00
|
|
|
# (nix-bitcoin + "/modules/presets/secure-node.nix")
|
2021-08-16 01:42:07 -07:00
|
|
|
|
|
|
|
{
|
2021-09-23 07:51:34 -07:00
|
|
|
# Automatically generate all secrets required by services.
|
|
|
|
# The secrets are stored in /etc/nix-bitcoin-secrets
|
2021-08-16 01:42:07 -07:00
|
|
|
nix-bitcoin.generateSecrets = true;
|
|
|
|
|
2021-09-23 07:51:34 -07:00
|
|
|
# Enable services.
|
|
|
|
# See ../configuration.nix for all available features.
|
2021-08-16 01:42:07 -07:00
|
|
|
services.bitcoind.enable = true;
|
|
|
|
|
|
|
|
# When using nix-bitcoin as part of a larger NixOS configuration, set the following to enable
|
|
|
|
# interactive access to nix-bitcoin features (like bitcoin-cli) for your system's main user
|
|
|
|
nix-bitcoin.operator = {
|
|
|
|
enable = true;
|
|
|
|
name = "main"; # Set this to your system's main user
|
|
|
|
};
|
|
|
|
|
|
|
|
# The system's main unprivileged user. This setting is usually part of your
|
|
|
|
# existing NixOS configuration.
|
|
|
|
users.users.main = {
|
|
|
|
isNormalUser = true;
|
|
|
|
password = "a";
|
|
|
|
};
|
2021-12-27 07:58:15 -08:00
|
|
|
|
|
|
|
# If you use a custom nixpkgs version for evaluating your system
|
|
|
|
# (instead of `nix-bitcoin.inputs.nixpkgs` like in this example),
|
|
|
|
# consider setting `useVersionLockedPkgs = true` to use the exact pkgs
|
|
|
|
# versions for nix-bitcoin services that are tested by nix-bitcoin.
|
|
|
|
# The downsides are increased evaluation times and increased system
|
|
|
|
# closure size.
|
|
|
|
#
|
|
|
|
# nix-bitcoin.useVersionLockedPkgs = true;
|
2021-08-16 01:42:07 -07:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|