Compare commits

..

No commits in common. "bcdaa091eb6b3b610bf0d5777c423556b107f108" and "78210642c073b96642f095dc424e2e5f1b32a2f4" have entirely different histories.

3 changed files with 20 additions and 23 deletions

View file

@ -33,9 +33,8 @@ let
ERRMAIL ERRMAIL
''; '';
onFailureUnits = [ onFailureUnits =
"email@%n.service" [ "email@%n.service" ]
]
++ optionals (cfg.ntfy.tokenFile != null) [ "ntfy-failure@%n.service" ]; ++ optionals (cfg.ntfy.tokenFile != null) [ "ntfy-failure@%n.service" ];
in in
{ {
@ -104,14 +103,9 @@ in
systemd.services."ntfy-failure@" = { systemd.services."ntfy-failure@" = {
description = "Send ntfy notification on service failure"; description = "Send ntfy notification on service failure";
onFailure = mkForce [ ]; onFailure = mkForce [ ];
unitConfig = {
StartLimitIntervalSec = "5m";
StartLimitBurst = 1;
};
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
}; ExecStart = pkgs.writeShellScript "ntfy-failure-notify" ''
script = ''
TOKEN=$(cat ${cfg.ntfy.tokenFile}) TOKEN=$(cat ${cfg.ntfy.tokenFile})
UNIT="$1" UNIT="$1"
${pkgs.curl}/bin/curl -s \ ${pkgs.curl}/bin/curl -s \
@ -122,7 +116,8 @@ in
-d "$(systemctl status --full "$UNIT" 2>&1 | head -40)" \ -d "$(systemctl status --full "$UNIT" 2>&1 | head -40)" \
${cfg.ntfy.url}/${cfg.ntfy.topic} ${cfg.ntfy.url}/${cfg.ntfy.topic}
''; '';
scriptArgs = "%i"; };
scriptArgs = "%I";
}; };
}) })
]); ]);

View file

@ -4,10 +4,9 @@ final: prev: {
gemini-cli gemini-cli
opencode opencode
tailscale tailscale
claude-code #claude-code
qwen-code qwen-code
llama-cpp-rocm llama-cpp-rocm
direnv
# open-webui # open-webui
# vscode # vscode
# nodejs_20 # nodejs_20
@ -22,7 +21,7 @@ final: prev: {
*/ */
# goose-cli = channels.unstable.callPackage ./goose.nix { }; # 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 { }; # gemini-cli = channels.unstable.callPackage ./gemini-cli/package.nix { };
# vscode-extensions = channels.unstable.vscode-extensions // { # vscode-extensions = channels.unstable.vscode-extensions // {
# rooveterinaryinc = { roo-cline = channels.unstable.callPackage ./roo-code.nix { }; }; # rooveterinaryinc = { roo-cline = channels.unstable.callPackage ./roo-code.nix { }; };

View file

@ -36,10 +36,13 @@ with lib.metacfg;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
attic-client attic-client
claude-code claude-code
dnsmasq
gh gh
imagemagick imagemagick
libvirt
nodejs nodejs
qemu qemu
virt-manager
sox sox
]; ];