air-quality-monitor/flake.nix
2023-11-29 02:02:15 +03:00

45 lines
1.1 KiB
Nix

{
description = "An air quality monitoring service with a Raspberry Pi and a SDS011 sensor.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = {
self,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [./nix/tests];
systems = ["x86_64-linux" "aarch64-linux"];
perSystem = {
self',
pkgs,
...
}: {
formatter = pkgs.alejandra;
packages = {
default = self'.packages.pi-air-quality-monitor;
pi-air-quality-monitor = pkgs.callPackage ./nix/default.nix {};
};
devShells = {
default = self'.packages.pi-air-quality-monitor;
pi-air-quality-monitor = pkgs.mkShell {
inputsFrom = self'.packages.pi-air-quality-monitor.pythonPath;
};
};
};
flake = {
nixosModules = {
default = self.nixosModules.pi-air-quality-monitor;
pi-air-quality-monitor = import ./nix/module.nix self;
};
};
};
}