Update flake.lock and flake.nix with new inputs and configurations

- Add new inputs: `lnbits`
- Modify `nix-bitcoin.nix` to include `lnbits` module
This commit is contained in:
Sam 2024-12-28 16:08:23 +00:00
parent eaebfcaeb4
commit 4addeb3fba
3 changed files with 197 additions and 5 deletions

View File

@ -202,6 +202,24 @@
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
@ -361,10 +379,29 @@
"type": "github" "type": "github"
} }
}, },
"lnbits": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"poetry2nix": "poetry2nix"
},
"locked": {
"lastModified": 1734684489,
"narHash": "sha256-df2CZXIEE8rQPyKNI7dzXzDGxTPERla8hvEiACyObgA=",
"owner": "lnbits",
"repo": "lnbits",
"rev": "3900d2871d2e8ec5a00028eb4e2e59417c4fb08e",
"type": "github"
},
"original": {
"owner": "lnbits",
"repo": "lnbits",
"type": "github"
}
},
"nix-bitcoin": { "nix-bitcoin": {
"inputs": { "inputs": {
"extra-container": "extra-container", "extra-container": "extra-container",
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
@ -425,6 +462,28 @@
"type": "github" "type": "github"
} }
}, },
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"lnbits",
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703863825,
"narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "5163432afc817cf8bd1f031418d1869e4c9d5547",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nix-secrets": { "nix-secrets": {
"locked": { "locked": {
"lastModified": 1732636943, "lastModified": 1732636943,
@ -520,6 +579,22 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1723938990,
"narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1730481737, "lastModified": 1730481737,
"narHash": "sha256-HaUCfqLIFX/4wiSKkKKSTwUNmZd1EMy+lGB+faadQXU=", "narHash": "sha256-HaUCfqLIFX/4wiSKkKKSTwUNmZd1EMy+lGB+faadQXU=",
@ -546,7 +621,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1729945968, "lastModified": 1729945968,
@ -578,16 +653,42 @@
"type": "github" "type": "github"
} }
}, },
"poetry2nix": {
"inputs": {
"flake-utils": "flake-utils",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"lnbits",
"nixpkgs"
],
"systems": "systems_2",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1724134185,
"narHash": "sha256-nDqpGjz7cq3ThdC98BPe1ANCNlsJds/LLZ3/MdIXjA0=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "5ee730a8752264e463c0eaf06cc060fd07f6dae9",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"arion": "arion", "arion": "arion",
"disko": "disko", "disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
"impermanence": "impermanence", "impermanence": "impermanence",
"lnbits": "lnbits",
"nix-bitcoin": "nix-bitcoin", "nix-bitcoin": "nix-bitcoin",
"nix-colors": "nix-colors", "nix-colors": "nix-colors",
"nix-secrets": "nix-secrets", "nix-secrets": "nix-secrets",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable_2", "nixpkgs-unstable": "nixpkgs-unstable_2",
"nixvim": "nixvim", "nixvim": "nixvim",
"nur": "nur", "nur": "nur",
@ -630,7 +731,58 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"id": "systems",
"type": "indirect"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": { "treefmt-nix": {
"inputs": {
"nixpkgs": [
"lnbits",
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1719749022,
"narHash": "sha256-ddPKHcqaKCIFSFc/cvxS14goUhCOAwsM1PbMr0ZtHMg=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",

View File

@ -32,6 +32,10 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
lnbits = {
url = "github:lnbits/lnbits";
};
# Nix colors # Nix colors
nix-colors.url = "github:misterio77/nix-colors"; nix-colors.url = "github:misterio77/nix-colors";

View File

@ -82,6 +82,7 @@ in {
}: { }: {
imports = [ imports = [
inputs.nix-bitcoin.nixosModules.default inputs.nix-bitcoin.nixosModules.default
inputs.lnbits.nixosModules.default
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim vim
@ -90,7 +91,12 @@ in {
]; ];
networking = { networking = {
defaultGateway = "${gatewayIp}"; defaultGateway = "${gatewayIp}";
interfaces.eth0.ipv4.addresses = [ { "address" = "${containerIp}"; "prefixLength" = 24; } ]; interfaces.eth0.ipv4.addresses = [
{
"address" = "${containerIp}";
"prefixLength" = 24;
}
];
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ allowedTCPPorts = [
@ -100,6 +106,8 @@ in {
config.containers.bitcoin-node.config.services.bitcoind.rpc.port config.containers.bitcoin-node.config.services.bitcoind.rpc.port
config.containers.bitcoin-node.config.services.mempool.frontend.port config.containers.bitcoin-node.config.services.mempool.frontend.port
config.containers.bitcoin-node.config.services.electrs.port config.containers.bitcoin-node.config.services.electrs.port
config.containers.bitcoin-node.config.services.rtl.port
config.containers.bitcoin-node.config.services.lnd.port
]; ];
}; };
useHostResolvConf = lib.mkForce false; useHostResolvConf = lib.mkForce false;
@ -109,7 +117,9 @@ in {
# node services here # node services here
nix-bitcoin.generateSecrets = true; nix-bitcoin.generateSecrets = true;
nix-bitcoin.nodeinfo.enable = true;
services = { services = {
backups.enable = true;
tor = { tor = {
enable = true; enable = true;
client.enable = true; client.enable = true;
@ -123,7 +133,6 @@ in {
txindex = true; txindex = true;
rpc = { rpc = {
address = "0.0.0.0"; address = "0.0.0.0";
threads = 6;
allowip = allowip; allowip = allowip;
users = let users = let
name = "bitcoin"; name = "bitcoin";
@ -151,11 +160,38 @@ in {
address = "0.0.0.0"; address = "0.0.0.0";
}; };
}; };
lnd = {
enable = true;
lndconnect = {
enable = true;
onion = true;
};
extraConfig = ''
alias=bitlab21
'';
};
rtl = {
enable = true;
nodes.lnd.enable = true;
address = "0.0.0.0";
};
lnbits = {
enable = true;
openFirewall = true;
host = "0.0.0.0";
port = 8231;
env = {LNBITS_ADMIN_UI = "true";};
};
}; };
# Add custom systemd overrides for above services
systemd.services.lnbits.after = ["lnd.service"];
nix-bitcoin.onionServices = { nix-bitcoin.onionServices = {
bitcoind.enable = true; bitcoind.enable = true;
electrs.enable = true; electrs.enable = true;
mempool-frontend.enable = true; mempool-frontend.enable = true;
lnd.public = true;
}; };
services.openssh = { services.openssh = {