style: requested change
Some checks failed
Check meta / check_meta (pull_request) Successful in 18s
Check meta / check_dns (pull_request) Successful in 50s
build configuration / build_vault01 (pull_request) Successful in 1m5s
build configuration / build_storage01 (pull_request) Successful in 1m6s
build configuration / build_compute01 (pull_request) Successful in 1m13s
build configuration / build_web02 (pull_request) Successful in 1m3s
build configuration / build_web01 (pull_request) Successful in 1m32s
build configuration / build_rescue01 (pull_request) Successful in 54s
build configuration / push_to_cache (pull_request) Failing after 2m14s
build configuration / build_web02 (push) Successful in 1m9s
build configuration / build_vault01 (push) Successful in 1m10s
build configuration / build_storage01 (push) Successful in 1m13s
build configuration / build_rescue01 (push) Successful in 1m13s
build configuration / push_to_cache (push) Successful in 2m12s
build configuration / build_compute01 (push) Successful in 1m18s
lint / check (push) Successful in 24s
build configuration / build_web01 (push) Successful in 1m36s
Some checks failed
Check meta / check_meta (pull_request) Successful in 18s
Check meta / check_dns (pull_request) Successful in 50s
build configuration / build_vault01 (pull_request) Successful in 1m5s
build configuration / build_storage01 (pull_request) Successful in 1m6s
build configuration / build_compute01 (pull_request) Successful in 1m13s
build configuration / build_web02 (pull_request) Successful in 1m3s
build configuration / build_web01 (pull_request) Successful in 1m32s
build configuration / build_rescue01 (pull_request) Successful in 54s
build configuration / push_to_cache (pull_request) Failing after 2m14s
build configuration / build_web02 (push) Successful in 1m9s
build configuration / build_vault01 (push) Successful in 1m10s
build configuration / build_storage01 (push) Successful in 1m13s
build configuration / build_rescue01 (push) Successful in 1m13s
build configuration / push_to_cache (push) Successful in 2m12s
build configuration / build_compute01 (push) Successful in 1m18s
lint / check (push) Successful in 24s
build configuration / build_web01 (push) Successful in 1m36s
This commit is contained in:
parent
4d16839a10
commit
1eea46b59f
1 changed files with 16 additions and 12 deletions
|
@ -1,18 +1,23 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
power.ups = {
|
||||
enable = true;
|
||||
ups."eaton" = {
|
||||
ups.eaton = {
|
||||
driver = "usbhid-ups";
|
||||
port = "auto";
|
||||
};
|
||||
upsmon.enable = false;
|
||||
users."eatonMon" = {
|
||||
users.eatonmon = {
|
||||
passwordFile = config.age.secrets."eatonmon-password_file".path;
|
||||
upsmon = "primary";
|
||||
};
|
||||
upsmon.monitor."eaton" = {
|
||||
user = "eatonMon";
|
||||
upsmon.monitor.eaton = {
|
||||
user = "eatonmon";
|
||||
};
|
||||
schedulerRules =
|
||||
let
|
||||
|
@ -32,7 +37,7 @@
|
|||
*) MEANING="Signal unknown, check configuration.";;
|
||||
esac
|
||||
sendmail -i -t <<ERRMAIL
|
||||
To: fai@dgnum.eu
|
||||
To: fai+monitoring@dgnum.eu
|
||||
Subject: [$HOSTNAME] Battery signal: $1
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
|
@ -45,8 +50,11 @@
|
|||
esac
|
||||
'';
|
||||
};
|
||||
rules = ''
|
||||
CMDSCRIPT ${cmdScript}/bin/upssched-cmd.sh
|
||||
in
|
||||
(pkgs.writeTextFile {
|
||||
name = "upssched.conf";
|
||||
text = ''
|
||||
CMDSCRIPT ${lib.getExe cmdScript}
|
||||
PIPEFN /var/state/ups/upssched/upssched.pipe
|
||||
LOCKFN /var/state/ups/upssched/upssched.lock
|
||||
AT LOWBATT * EXECUTE shutdown-low
|
||||
|
@ -57,10 +65,6 @@
|
|||
AT NOCOMM * EXECUTE warn-comm
|
||||
AT BYPASS * EXECUTE warn-bypass
|
||||
'';
|
||||
in
|
||||
(pkgs.writeTextFile {
|
||||
name = "upssched.conf";
|
||||
text = rules;
|
||||
}).outPath;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue