dots/lib/mkNixBitcoinHost.nix
Gene Liverman 72fca31cf3 Repurpose nixnas1 as beancoin1
This includes configuring Nix Bitcoin within my existing flake. The
intent is to run Bitcoin Core, LND, Electrs, Mempool, and Alby Hub here
instead of via Umbrel.

Note, Fulcrum was tried but kept crashing and losing state... which is
not okay with me.
2025-02-04 16:07:22 -05:00

36 lines
1.1 KiB
Nix

{ inputs, ... }: {
mkNixBitcoinHost = {
system ? "x86_64-linux",
hostname,
username ? "gene",
additionalModules ? [],
additionalSpecialArgs ? {}
}: inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs hostname username; } // additionalSpecialArgs;
modules = [
./nixpkgs-settings.nix
inputs.disko.nixosModules.disko
inputs.nix-bitcoin.nixosModules.default
inputs.sops-nix.nixosModules.sops # system wide secrets management
../modules/hosts/nixos # system-wide stuff
../modules/hosts/nixos/${hostname} # host specific stuff
inputs.home-manager.nixosModules.home-manager {
home-manager = {
extraSpecialArgs = { inherit inputs hostname username; };
useGlobalPkgs = true;
useUserPackages = true;
users.${username}.imports = [
../modules/hosts/common
../modules/hosts/common/linux/home.nix
../modules/hosts/nixos/${hostname}/home-${username}.nix
];
};
}
] ++ additionalModules;
};
}