60 lines
1.9 KiB
Nix
60 lines
1.9 KiB
Nix
{
|
|
description = "BTCPay server, NBXplorer, Bitcoin Core, etc. as a NixOS system/container image";
|
|
|
|
inputs = {
|
|
nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release";
|
|
nixpkgs.follows = "nix-bitcoin/nixpkgs";
|
|
nixos-generators.url = "github:nix-community/nixos-generators";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nix-bitcoin, nixos-generators, flake-utils, ... }:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs { inherit system; };
|
|
modules = [
|
|
nix-bitcoin.nixosModules.default
|
|
./modules/bitcoind
|
|
./modules/nbxplorer
|
|
./modules/btcpay
|
|
];
|
|
in {
|
|
nixosConfigurations.btc-pay-server = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = modules ++ [
|
|
({ config, ... }: {
|
|
boot.isContainer = true;
|
|
# boot.mountDebugFS = false;
|
|
system.stateVersion = "25.05";
|
|
# services.btcpay-full.enable = true;
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAaV7JtUWkWrjo5FfCcpTCCEY/OJ+T1mJOLbe4avg0XH sysadmin@skrybit.io"
|
|
];
|
|
services.openssh = {
|
|
enable = true;
|
|
settings = {
|
|
PermitRootLogin = "prohibit-password";
|
|
PasswordAuthentication = false;
|
|
};
|
|
};
|
|
})
|
|
];
|
|
};
|
|
|
|
devShells = flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in {
|
|
default = pkgs.mkShell {
|
|
buildInputs = [
|
|
nixos-generators.packages.${system}.nixos-generate
|
|
pkgs.just
|
|
];
|
|
shellHook = ''
|
|
echo "💚 Devshell ready: nixos-generate, just available."
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|