formatting and change owner of secret
This commit is contained in:
@@ -5,9 +5,8 @@ let
|
|||||||
source ${config.age.secrets.webhook-smartd.path}
|
source ${config.age.secrets.webhook-smartd.path}
|
||||||
MSG=$(
|
MSG=$(
|
||||||
${pkgs.coreutils}/bin/cat <<EOF
|
${pkgs.coreutils}/bin/cat <<EOF
|
||||||
Problem detected with disk: $SMARTD_DEVICESTRING
|
**Problem detected with disk**: $SMARTD_DEVICESTRING
|
||||||
Warning message from smartd is:
|
**Warning message from smartd is**:
|
||||||
|
|
||||||
$SMARTD_FULLMESSAGE
|
$SMARTD_FULLMESSAGE
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
@@ -24,9 +23,11 @@ in {
|
|||||||
enable = lib.mkEnableOption "Enables smartd monitoring";
|
enable = lib.mkEnableOption "Enables smartd monitoring";
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
age.secrets.webhook-smartd = {
|
age.secrets.webhook-smartd = {
|
||||||
file = ../../secrets/webhook.age;
|
file = ../../secrets/webhook.age; #File contains WEBHOOK_URL="https://discord.com/api/webhooks/..."
|
||||||
mode = "444";
|
owner = "root";
|
||||||
|
group = "root";
|
||||||
|
mode = "400";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.smartd = {
|
services.smartd = {
|
||||||
|
|||||||
Reference in New Issue
Block a user