Files
lidarr-mb-gap/flake.nix
Danilo Reyes f3f154d1b0 Refactor NixOS module and flake configuration for lidarr-mb-gap
- Updated `flake.nix` to streamline output definitions and improve readability.
- Refactored NixOS module configurations in `nixos/lidarr-mb-gap.nix` for better structure and clarity.
- Simplified the package import process in `nix/package.nix` by removing unnecessary parameters.
- Enhanced example configurations in `nixos/EXAMPLE_CONFIG.nix` to align with the new structure.
2025-11-11 15:46:42 -06:00

63 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 =
{ 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";
};
}
);
}