diff --git a/hosts/by-name/servo/services/bitcoin.nix b/hosts/by-name/servo/services/bitcoin.nix new file mode 100644 index 000000000..c635345ed --- /dev/null +++ b/hosts/by-name/servo/services/bitcoin.nix @@ -0,0 +1,22 @@ +# as of 2023/12/02: complete blockchain is 530 GiB (on-disk size may be larger) +{ ... }: +{ + sane.persist.sys.byStore.ext = [ + # /var/lib/monero/lmdb is what consumes most of the space + { user = "bitcoind-mainnet"; group = "bitcoind-mainnet"; path = "/var/lib/bitcoind-mainnet"; } + ]; + + sane.ports.ports."8333" = { + # this allows other nodes and clients to download blocks from me. + protocol = [ "tcp" ]; + visibleTo.wan = true; + description = "colin-bitcoin"; + }; + + services.bitcoind.mainnet = { + enable = true; + # TODO: set `rpc.users` to include my user + }; + + +} diff --git a/hosts/by-name/servo/services/default.nix b/hosts/by-name/servo/services/default.nix index 520789b07..5828c84a4 100644 --- a/hosts/by-name/servo/services/default.nix +++ b/hosts/by-name/servo/services/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./bitcoin.nix ./calibre.nix ./coturn.nix ./ddns-afraid.nix diff --git a/hosts/common/ids.nix b/hosts/common/ids.nix index 79366b1c2..b989a5520 100644 --- a/hosts/common/ids.nix +++ b/hosts/common/ids.nix @@ -53,6 +53,8 @@ sane.ids.monero.gid = 2416; sane.ids.slskd.uid = 2417; sane.ids.slskd.gid = 2417; + sane.ids.bitcoind-mainnet.uid = 2418; + sane.ids.bitcoind-mainnet.gid = 2418; sane.ids.colin.uid = 1000; sane.ids.guest.uid = 1100;