Merge fort-nix/nix-bitcoin#655: examples/flake.nix: minor improvements
742fd8fdd0examples/flake.nix: add `inputs.nixpkgs` (Erik Arvstedt)89ea349312examples/flake.nix: add comments and extra service (Erik Arvstedt) Pull request description: ACKs for top commit: jonasnick: ACK742fd8fdd0Tree-SHA512: 7879d2c4cfa95db7b0310d402f6d8dc78fad1667f6a1021f466b8307e6f62235d113df70cc0932695fd3d80d7b141e7463e03ad45aac93c7e655c59c12c90a2f
This commit is contained in:
@@ -101,4 +101,5 @@ It's easiest to use an existing service as a template:
|
|||||||
- [flake.nix](../flake.nix): update `nixpkgs.url`
|
- [flake.nix](../flake.nix): update `nixpkgs.url`
|
||||||
- [cirrus.yml](../.cirrus.yml): update toplevel container -> image attribute
|
- [cirrus.yml](../.cirrus.yml): update toplevel container -> image attribute
|
||||||
- [examples/configuration.nix](../examples/configuration.nix): update `system.stateVersion`
|
- [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
|
- 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";
|
description = "A basic nix-bitcoin node";
|
||||||
|
|
||||||
@@ -5,9 +12,12 @@
|
|||||||
# You can also use a version branch to track a specific NixOS release
|
# 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";
|
# 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";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
nix-bitcoin.nixosModules.default
|
nix-bitcoin.nixosModules.default
|
||||||
@@ -23,21 +33,25 @@
|
|||||||
# The secrets are stored in /etc/nix-bitcoin-secrets
|
# The secrets are stored in /etc/nix-bitcoin-secrets
|
||||||
nix-bitcoin.generateSecrets = true;
|
nix-bitcoin.generateSecrets = true;
|
||||||
|
|
||||||
# Enable services.
|
# Enable some services.
|
||||||
# See ../configuration.nix for all available features.
|
# See ../configuration.nix for all available features.
|
||||||
services.bitcoind.enable = true;
|
services.bitcoind.enable = true;
|
||||||
|
services.clightning.enable = true;
|
||||||
|
|
||||||
# When using nix-bitcoin as part of a larger NixOS configuration, set the following to enable
|
# 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
|
# interactive access to nix-bitcoin features (like bitcoin-cli) for your system's main user
|
||||||
nix-bitcoin.operator = {
|
nix-bitcoin.operator = {
|
||||||
enable = true;
|
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
|
# The system's main unprivileged user.
|
||||||
# existing NixOS configuration.
|
# In an existing NixOS configuration, this setting is usually already defined.
|
||||||
users.users.main = {
|
users.users.main = {
|
||||||
isNormalUser = true;
|
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";
|
password = "a";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user