mirror of
https://codeberg.org/icewind/wifi-prometheus-exporter.git
synced 2026-06-03 08:34:25 +02:00
fmt
This commit is contained in:
parent
a531df8b3f
commit
dfb6dd0b57
3 changed files with 44 additions and 45 deletions
13
flake.nix
13
flake.nix
|
|
@ -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 = {
|
||||||
|
|
|
||||||
13
module.nix
13
module.nix
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
||||||
13
package.nix
13
package.nix
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue