air-quality-monitor/flake.nix

38 lines
887 B
Nix
Raw Normal View History

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