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";
|
||||
};
|
||||
};
|
||||
outputs = { mill-scale, ... }: mill-scale ./. {
|
||||
outputs = {mill-scale, ...}:
|
||||
mill-scale ./. {
|
||||
packages.wifi-prometheus-exporter = import ./package.nix;
|
||||
|
||||
nixosModules = {outputs, ...}: {
|
||||
default =
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
default = {
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [./module.nix];
|
||||
config = {
|
||||
|
|
|
|||
13
module.nix
13
module.nix
|
|
@ -1,7 +1,8 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.services.prometheus.exporters.wifi;
|
||||
|
|
@ -20,9 +21,7 @@ with lib; let
|
|||
password_file = "$CREDENTIALS_DIRECTORY/mqtt_password";
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.services.prometheus.exporters.wifi = {
|
||||
enable = mkEnableOption "WiFi prometheus exporter";
|
||||
|
||||
|
|
|
|||
13
package.nix
13
package.nix
|
|
@ -1,10 +1,9 @@
|
|||
{ rustPlatform
|
||||
, openssl
|
||||
, pkg-config
|
||||
, lib
|
||||
,
|
||||
}:
|
||||
let
|
||||
{
|
||||
rustPlatform,
|
||||
openssl,
|
||||
pkg-config,
|
||||
lib,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
src = sourceByRegex ./. ["Cargo.*" "(src)(/.*)?"];
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue