17 lines
453 B
Nix
17 lines
453 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
|
|
systemd.services."mu5001tool" = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
serviceConfig = {
|
|
DynamicUser = true;
|
|
LoadCredential = "zte-hypermobile-5g-password:${config.sops.secrets."zte-hypermobile-5g-password".path}";
|
|
};
|
|
script = ''
|
|
${lib.getExe pkgs.mu5001tool} --password-file ''${CREDENTIALS_DIRECTORY}/zte-hypermobile-5g-password prometheus-exporter --listen-port 9242
|
|
'';
|
|
};
|
|
|
|
}
|