- Updated `flake.nix` to import the new Nix package definition from `nix/package.nix`, streamlining the build process for the lidarr-mb-gap application. - Enhanced the README.md to include new features such as NixOS module support for automated deployment, detailed deployment instructions, and configuration options for SSH and output directories. - Added sections for troubleshooting output file issues and clarified the structure of the project, including new files for deployment and web serving.
59 lines
1.6 KiB
Nix
59 lines
1.6 KiB
Nix
{
|
|
description = "Lidarr to MusicBrainz Missing Albums Finder";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
let
|
|
# NixOS module output (not system-specific)
|
|
# The module accepts a package option, which can be set from the flake's packages
|
|
nixosModules = {
|
|
lidarr-mb-gap = import ./nixos/lidarr-mb-gap.nix;
|
|
};
|
|
in
|
|
{
|
|
# Export NixOS modules
|
|
nixosModules = nixosModules;
|
|
} // flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
lib = pkgs.lib;
|
|
lidarr-mb-gap = import ./nix/package.nix {
|
|
inherit pkgs lib;
|
|
src = lib.cleanSource ./src;
|
|
};
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = [
|
|
(pkgs.python3.withPackages (ps: with ps; [
|
|
requests
|
|
python-dotenv
|
|
]))
|
|
pkgs.black
|
|
];
|
|
shellHook = ''
|
|
echo "Python environment ready!"
|
|
echo "Run: python src/main.py"
|
|
echo "Format code with: black src/"
|
|
'';
|
|
};
|
|
|
|
packages.default = lidarr-mb-gap;
|
|
packages.lidarr-mb-gap = lidarr-mb-gap;
|
|
apps.default = {
|
|
type = "app";
|
|
program = "${lidarr-mb-gap}/bin/lidarr-mb-gap";
|
|
};
|
|
apps.lidarr-mb-gap = {
|
|
type = "app";
|
|
program = "${lidarr-mb-gap}/bin/lidarr-mb-gap";
|
|
};
|
|
}
|
|
);
|
|
}
|
|
|