forked from fort-nix/nix-bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
importable-configuration.nix
38 lines (32 loc) · 1.12 KB
/
importable-configuration.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# You can directly copy and import this file to use nix-bitcoin
# in an existing NixOS configuration.
# Make sure to check and edit all lines marked by 'FIXME:'
# See ./flakes/flake.nix on how to include nix-bitcoin in a flake-based
# system configuration.
let
# FIXME:
# Overwrite `builtins.fetchTarball {}` with the output of
# command ../helper/fetch-release
nix-bitcoin = builtins.fetchTarball {};
in
{ config, pkgs, lib, ... }: {
imports = [
"${nix-bitcoin}/modules/modules.nix"
];
# Automatically generate all secrets required by services.
# The secrets are stored in /etc/nix-bitcoin-secrets
nix-bitcoin.generateSecrets = true;
# Enable some services.
# See ./configuration.nix for all available features.
services.bitcoind.enable = true;
services.clightning.enable = true;
# Enable interactive access to nix-bitcoin features (like bitcoin-cli) for
# your system's main user
nix-bitcoin.operator = {
enable = true;
# FIXME: Set this to your system's main user
name = "main";
};
# Prevent garbage collection of the nix-bitcoin source
system.extraDependencies = [ nix-bitcoin ];
}