add modules.nix

Importing modules.nix enables the stand-alone use of the modules, without the
config presets of nix-bitcoin.nix.
This commit is contained in:
Erik Arvstedt 2019-11-27 14:04:20 +01:00
parent 3b842e5fe7
commit 6def181dbc
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
4 changed files with 33 additions and 34 deletions

View File

@ -1,4 +1,5 @@
{ {
modules = ./modules.nix;
bitcoind = ./bitcoind.nix; bitcoind = ./bitcoind.nix;
clightning = ./clightning.nix; clightning = ./clightning.nix;
default = ./default.nix; default = ./default.nix;
@ -7,7 +8,6 @@
liquid = ./liquid.nix; liquid = ./liquid.nix;
nanopos = ./nanopos.nix; nanopos = ./nanopos.nix;
nix-bitcoin = ./nix-bitcoin.nix; nix-bitcoin = ./nix-bitcoin.nix;
nix-bitcoin-pkgs = ./nix-bitcoin-pkgs.nix;
nix-bitcoin-webindex = ./nix-bitcoin-webindex.nix; nix-bitcoin-webindex = ./nix-bitcoin-webindex.nix;
spark-wallet = ./spark-wallet.nix; spark-wallet = ./spark-wallet.nix;
recurring-donations = ./recurring-donations.nix; recurring-donations = ./recurring-donations.nix;

31
modules/modules.nix Normal file
View File

@ -0,0 +1,31 @@
{ config, pkgs, ... }:
let
nixpkgs-pinned = import ../pkgs/nixpkgs-pinned.nix;
unstable = import nixpkgs-pinned.nixpkgs-unstable {};
allPackages = pkgs: (import ../pkgs { inherit pkgs; }) // {
bitcoin = unstable.bitcoin.override { miniupnpc = null; };
bitcoind = unstable.bitcoind.override { miniupnpc = null; };
clightning = unstable.clightning;
lnd = unstable.lnd;
};
in {
imports = [
./bitcoind.nix
./clightning.nix
./lightning-charge.nix
./nanopos.nix
./nix-bitcoin-webindex.nix
./liquid.nix
./spark-wallet.nix
./electrs.nix
./onion-chef.nix
./recurring-donations.nix
./hardware-wallets.nix
./lnd.nix
];
disabledModules = [ "services/networking/bitcoind.nix" ];
nixpkgs.overlays = [ (self: super: allPackages super) ];
}

View File

@ -1,17 +0,0 @@
{ config, pkgs, ... }:
let
nixpkgs-pinned = import ../pkgs/nixpkgs-pinned.nix;
nixpkgs-unstable = import nixpkgs-pinned.nixpkgs-unstable { };
in {
disabledModules = [ "services/networking/bitcoind.nix" ];
nixpkgs.overlays = [ (import ../overlay.nix) ];
nixpkgs.config.packageOverrides = pkgs: {
# Use bitcoin and clightning from unstable
bitcoin = nixpkgs-unstable.bitcoin.override { miniupnpc = null; };
blockchains.bitcoind = nixpkgs-unstable.bitcoind.override { miniupnpc = null; };
clightning = nixpkgs-unstable.clightning.override { };
lnd = nixpkgs-unstable.lnd.override { };
};
}

View File

@ -15,21 +15,7 @@ let
chown -R operator ${config.users.users.operator.home}/.ssh chown -R operator ${config.users.users.operator.home}/.ssh
''; '';
in { in {
imports = [ imports = [ ./modules.nix ];
./nix-bitcoin-pkgs.nix
./bitcoind.nix
./clightning.nix
./lightning-charge.nix
./nanopos.nix
./nix-bitcoin-webindex.nix
./liquid.nix
./spark-wallet.nix
./electrs.nix
./onion-chef.nix
./recurring-donations.nix
./hardware-wallets.nix
./lnd.nix
];
options.services.nix-bitcoin = { options.services.nix-bitcoin = {
enable = mkOption { enable = mkOption {
@ -207,4 +193,3 @@ in {
]; ];
}; };
} }