From 7476d1555814b7cf21751767fce6f6b9f38a7e89 Mon Sep 17 00:00:00 2001 From: albert Date: Thu, 2 May 2024 10:41:56 +0900 Subject: [PATCH] Adding bitcoin --- flake.nix | 2 ++ nixos/hosts/framework-server/bitcoin.nix | 16 ++++++++++++++++ nixos/hosts/framework-server/default.nix | 1 + 3 files changed, 19 insertions(+) create mode 100644 nixos/hosts/framework-server/bitcoin.nix diff --git a/flake.nix b/flake.nix index 46421e7d..d44b231d 100644 --- a/flake.nix +++ b/flake.nix @@ -48,6 +48,8 @@ hyprland.url = "github:hyprwm/Hyprland"; # Steam Deck configs for NixOS jovian.url = "github:Jovian-Experiments/Jovian-NixOS"; + # Bitcoin node + inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release"; }; outputs = { self, nixpkgs, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, deploy-rs, jovian, ... } @inputs: let diff --git a/nixos/hosts/framework-server/bitcoin.nix b/nixos/hosts/framework-server/bitcoin.nix new file mode 100644 index 00000000..6ce1e6dd --- /dev/null +++ b/nixos/hosts/framework-server/bitcoin.nix @@ -0,0 +1,16 @@ +{ inputs, config, pkgs, username, ... }: { + import = [ + inputs.nix-bitcoin.nixosModules.default + # Secure defaults + (inputs.nix-bitcoin + "/modules/presets/secure-node.nix") + ]; + + nix-bitcoin = { + enable = true; + operator = username; + }; + + services.bitcoind.dataDir = "/Storage/bitcoind"; + services.bitcoind.txindex = true; + +} diff --git a/nixos/hosts/framework-server/default.nix b/nixos/hosts/framework-server/default.nix index fa14ba95..5603eb69 100644 --- a/nixos/hosts/framework-server/default.nix +++ b/nixos/hosts/framework-server/default.nix @@ -14,6 +14,7 @@ ./wireguard.nix ./cron.nix ./firewall.nix + ./bitcoin.nix ]; environment.systemPackages = [