From 5af8c832ef5f0b858ffbfc315913b3f07d39b761 Mon Sep 17 00:00:00 2001 From: satr14 Date: Thu, 30 Apr 2026 17:38:19 +0700 Subject: [PATCH 1/2] notif tweaks --- modules/hardware/misc/battery-power.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/hardware/misc/battery-power.nix b/modules/hardware/misc/battery-power.nix index 12043dd..3a2ca6b 100644 --- a/modules/hardware/misc/battery-power.nix +++ b/modules/hardware/misc/battery-power.nix @@ -17,8 +17,8 @@ BAT_PCT=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '[0-9]+(?=%)'` BAT_STA=`${pkgs.acpi}/bin/acpi -b | ${pkgs.gnugrep}/bin/grep -P -o '\w+(?=,)'` echo "`date` battery status:$BAT_STA percentage:$BAT_PCT" - test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -c device -u normal "Low Battery" "Battery remaining: $BAT_PCT%." - test $BAT_PCT -le 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -c device -u critical "Low Battery" "Shutdown at 10%." + test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send "Low Battery" "Battery remaining: $BAT_PCT%." + test $BAT_PCT -le 15 && test $BAT_STA = "Discharging" && DISPLAY=:0.0 ${pkgs.libnotify}/bin/notify-send -u critical "Low Battery" "Shutdown at 10%." ''} > /tmp/cron.batt.log 2>&1" ]; }; From bd07e04d51faf40345aa5fce76487c893f8e9645 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 1 May 2026 07:36:39 +0700 Subject: [PATCH 2/2] change acme dir --- modules/system/homelab/proxy.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/system/homelab/proxy.nix b/modules/system/homelab/proxy.nix index ee3930e..c5cfc80 100644 --- a/modules/system/homelab/proxy.nix +++ b/modules/system/homelab/proxy.nix @@ -21,8 +21,9 @@ in { certs."${homelab.proxy.base}" = { domain = "*.${homelab.proxy.base}"; extraDomainNames = [ homelab.proxy.base ]; - dnsProvider = "cloudflare"; + directory = "/mnt/data/apps/acme/${homelab.proxy.base}"; environmentFile = "/mnt/data/apps/acme/cf-api.env"; + dnsProvider = "cloudflare"; # ^^^contents: CLOUDFLARE_DNS_API_TOKEN=XXXXX }; };