mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-22 22:33:46 +03:00
Merge fort-nix/nix-bitcoin#655: examples/flake.nix: minor improvements
742fd8fdd0
examples/flake.nix: add `inputs.nixpkgs` (Erik Arvstedt)89ea349312
examples/flake.nix: add comments and extra service (Erik Arvstedt) Pull request description: ACKs for top commit: jonasnick: ACK742fd8fdd0
Tree-SHA512: 7879d2c4cfa95db7b0310d402f6d8dc78fad1667f6a1021f466b8307e6f62235d113df70cc0932695fd3d80d7b141e7463e03ad45aac93c7e655c59c12c90a2f
This commit is contained in:
commit
8a8f32a4fa
@ -101,4 +101,5 @@ It's easiest to use an existing service as a template:
|
||||
- [flake.nix](../flake.nix): update `nixpkgs.url`
|
||||
- [cirrus.yml](../.cirrus.yml): update toplevel container -> image attribute
|
||||
- [examples/configuration.nix](../examples/configuration.nix): update `system.stateVersion`
|
||||
- [examples/flakes/flake.nix](../examples/flakes/flake.nix): update `inputs.nix-bitcoin.url`
|
||||
- Treewide: check if any `TODO-EXTERNAL` comments can be resolved
|
||||
|
@ -1,3 +1,10 @@
|
||||
# This is a system configuration template that uses nix-bitcoin.
|
||||
#
|
||||
# You can adapt this to an existing system flake by copying the parts
|
||||
# relevant to nix-bitcoin.
|
||||
#
|
||||
# Make sure to check and edit all lines marked by 'FIXME:'
|
||||
|
||||
{
|
||||
description = "A basic nix-bitcoin node";
|
||||
|
||||
@ -5,9 +12,12 @@
|
||||
# You can also use a version branch to track a specific NixOS release
|
||||
# inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/nixos-23.05";
|
||||
|
||||
outputs = { self, nix-bitcoin }: {
|
||||
inputs.nixpkgs.follows = "nix-bitcoin/nixpkgs";
|
||||
inputs.nixpkgs-unstable.follows = "nix-bitcoin/nixpkgs-unstable";
|
||||
|
||||
nixosConfigurations.mynode = nix-bitcoin.inputs.nixpkgs.lib.nixosSystem {
|
||||
outputs = { self, nixpkgs, nix-bitcoin, ... }: {
|
||||
|
||||
nixosConfigurations.mynode = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
nix-bitcoin.nixosModules.default
|
||||
@ -23,21 +33,25 @@
|
||||
# The secrets are stored in /etc/nix-bitcoin-secrets
|
||||
nix-bitcoin.generateSecrets = true;
|
||||
|
||||
# Enable services.
|
||||
# Enable some services.
|
||||
# See ../configuration.nix for all available features.
|
||||
services.bitcoind.enable = true;
|
||||
services.clightning.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
|
||||
# FIXME: Set this to your system's main user
|
||||
name = "main";
|
||||
};
|
||||
|
||||
# The system's main unprivileged user. This setting is usually part of your
|
||||
# existing NixOS configuration.
|
||||
# The system's main unprivileged user.
|
||||
# In an existing NixOS configuration, this setting is usually already defined.
|
||||
users.users.main = {
|
||||
isNormalUser = true;
|
||||
# FIXME: This is unsafe. Use `hashedpassword` or `passwordFile` instead in a real
|
||||
# deployment: https://search.nixos.org/options?show=users.users.%3Cname%3E.hashedPassword
|
||||
password = "a";
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user