This commit is contained in:
Robin Appelman 2025-06-02 21:34:58 +02:00
commit dfb6dd0b57
3 changed files with 44 additions and 45 deletions

View file

@ -10,15 +10,16 @@
inputs.flakelight.follows = "flakelight"; inputs.flakelight.follows = "flakelight";
}; };
}; };
outputs = { mill-scale, ... }: mill-scale ./. { outputs = {mill-scale, ...}:
mill-scale ./. {
packages.wifi-prometheus-exporter = import ./package.nix; packages.wifi-prometheus-exporter = import ./package.nix;
nixosModules = {outputs, ...}: { nixosModules = {outputs, ...}: {
default = default = {
{ pkgs pkgs,
, config config,
, lib lib,
, ... ...
}: { }: {
imports = [./module.nix]; imports = [./module.nix];
config = { config = {

View file

@ -1,7 +1,8 @@
{ config {
, lib config,
, pkgs lib,
, ... pkgs,
...
}: }:
with lib; let with lib; let
cfg = config.services.prometheus.exporters.wifi; cfg = config.services.prometheus.exporters.wifi;
@ -20,9 +21,7 @@ with lib; let
password_file = "$CREDENTIALS_DIRECTORY/mqtt_password"; password_file = "$CREDENTIALS_DIRECTORY/mqtt_password";
}; };
}; };
in {
in
{
options.services.prometheus.exporters.wifi = { options.services.prometheus.exporters.wifi = {
enable = mkEnableOption "WiFi prometheus exporter"; enable = mkEnableOption "WiFi prometheus exporter";

View file

@ -1,10 +1,9 @@
{ rustPlatform {
, openssl rustPlatform,
, pkg-config openssl,
, lib pkg-config,
, lib,
}: }: let
let
inherit (lib.sources) sourceByRegex; inherit (lib.sources) sourceByRegex;
src = sourceByRegex ./. ["Cargo.*" "(src)(/.*)?"]; src = sourceByRegex ./. ["Cargo.*" "(src)(/.*)?"];
in in