diff --git a/modules/nixos/services/systemd-email-notify/default.nix b/modules/nixos/services/systemd-email-notify/default.nix index cfa26c3..874d0be 100644 --- a/modules/nixos/services/systemd-email-notify/default.nix +++ b/modules/nixos/services/systemd-email-notify/default.nix @@ -33,10 +33,9 @@ let ERRMAIL ''; - onFailureUnits = [ - "email@%n.service" - ] - ++ optionals (cfg.ntfy.tokenFile != null) [ "ntfy-failure@%n.service" ]; + onFailureUnits = + [ "email@%n.service" ] + ++ optionals (cfg.ntfy.tokenFile != null) [ "ntfy-failure@%n.service" ]; in { options = { @@ -104,25 +103,21 @@ in systemd.services."ntfy-failure@" = { description = "Send ntfy notification on service failure"; onFailure = mkForce [ ]; - unitConfig = { - StartLimitIntervalSec = "5m"; - StartLimitBurst = 1; - }; serviceConfig = { Type = "oneshot"; + ExecStart = pkgs.writeShellScript "ntfy-failure-notify" '' + TOKEN=$(cat ${cfg.ntfy.tokenFile}) + UNIT="$1" + ${pkgs.curl}/bin/curl -s \ + -H "Authorization: Bearer $TOKEN" \ + -H "Title: Service failed: $UNIT" \ + -H "Priority: urgent" \ + -H "Tags: rotating_light" \ + -d "$(systemctl status --full "$UNIT" 2>&1 | head -40)" \ + ${cfg.ntfy.url}/${cfg.ntfy.topic} + ''; }; - script = '' - TOKEN=$(cat ${cfg.ntfy.tokenFile}) - UNIT="$1" - ${pkgs.curl}/bin/curl -s \ - -H "Authorization: Bearer $TOKEN" \ - -H "Title: Service failed: $UNIT" \ - -H "Priority: urgent" \ - -H "Tags: rotating_light" \ - -d "$(systemctl status --full "$UNIT" 2>&1 | head -40)" \ - ${cfg.ntfy.url}/${cfg.ntfy.topic} - ''; - scriptArgs = "%i"; + scriptArgs = "%I"; }; }) ]); diff --git a/overlays/unstable/default.nix b/overlays/unstable/default.nix index c152d11..7a12bb9 100644 --- a/overlays/unstable/default.nix +++ b/overlays/unstable/default.nix @@ -4,10 +4,9 @@ final: prev: { gemini-cli opencode tailscale - claude-code + #claude-code qwen-code llama-cpp-rocm - direnv # open-webui # vscode # nodejs_20 @@ -22,7 +21,7 @@ final: prev: { */ # goose-cli = channels.unstable.callPackage ./goose.nix { }; - # claude-code = channels.unstable.callPackage ./claude-code/package.nix { }; + claude-code = channels.unstable.callPackage ./claude-code/package.nix { }; # gemini-cli = channels.unstable.callPackage ./gemini-cli/package.nix { }; # vscode-extensions = channels.unstable.vscode-extensions // { # rooveterinaryinc = { roo-cline = channels.unstable.callPackage ./roo-code.nix { }; }; diff --git a/systems/aarch64-darwin/rialo/default.nix b/systems/aarch64-darwin/rialo/default.nix index ef683f2..54bead8 100644 --- a/systems/aarch64-darwin/rialo/default.nix +++ b/systems/aarch64-darwin/rialo/default.nix @@ -36,10 +36,13 @@ with lib.metacfg; environment.systemPackages = with pkgs; [ attic-client claude-code + dnsmasq gh imagemagick + libvirt nodejs qemu + virt-manager sox ];