Task with alerts to Ntfy

This commit is contained in:
2026-03-17 09:57:17 +11:00
parent d756e966b1
commit 9f9073ee40
5 changed files with 408 additions and 39 deletions

View File

@@ -29,6 +29,159 @@ home.stateVersion = "25.11";
services.swaync = {
enable = true;
settings = {
positionX = "right";
positionY = "top";
control-center-margin-top = 10;
control-center-margin-right = 10;
control-center-width = 380;
notification-window-width = 400;
notification-icon-size = 64;
notification-body-image-height = 100;
notification-body-image-width = 200;
timeout = 10;
timeout-low = 5;
timeout-critical = 0;
widgets = [
"notifications"
"mpris"
"volume"
"backlight"
"buttons-grid"
];
"widget-config" = {
notifications = {
"hide-on-clear" = false;
"hide-on-action" = true;
};
mpris = {
"image-size" = 96;
"image-radius" = 12;
};
volume = {
label = "󰕾";
};
backlight = {
label = "󰃞";
};
"buttons-grid" = {
actions = [
{
label = "󰐥";
command = "systemctl poweroff";
}
{
label = "󰜉";
command = "systemctl reboot";
}
{
label = "󰍁";
command = "swaylock";
}
];
};
};
};
};
# services.mako = {
# enable = true;
#
# # Essential Wayland integration
# layer = "overlay"; # Required for Niri
# output = ""; # Shows on all outputs
#
# # Design (matches your Dunst preferences)
# font = "JetBrainsMono Nerd Font 10";
# backgroundColor = "#1e1e2e";
# borderColor = "#89b4fa";
# borderSize = 2;
# borderRadius = 5;
#
# # Positioning
# anchor = "top-right";
# margin = "30,30"; # X,Y from anchor
# width = 300;
# height = 200;
#
# # Behavior
# defaultTimeout = 10000; # ms
# sort = "-time"; # Newest on top-right
#
# settings = {
# "[urgency=high]" = {
# background-color = "#f38ba8";
# default-timeout = 0;
# };
# };
# };
# Deploy the script to ~/.local/bin (Nix handles creation/permissions)
home.file.".local/bin/task-due-notify" = {
source = ./bin/task-due-notify.sh;
executable = true;
};
systemd.user.timers.task-due-notify = {
Unit = {
Description = "Timer for Taskwarrior due notifications";
};
Timer = {
OnBootSec = "1min";
OnCalendar = "*:*:0/1"; # Every 5 minutes
Persistent = true;
};
Install = {
WantedBy = ["timers.target"];
};
};
# systemd.user.services.task-due-notify = {
# Unit = {
# Description = "Check for due Taskwarrior tasks and notify";
# };
# Service = {
# Type = "oneshot";
# ExecStart = "${pkgs.bash}/bin/bash${config.home.homeDirectory}/.local/bin/task-due-notify";
# };
# };
# Systemd user timer to run the service periodically
# systemd.user.timers.task-due-notify = {
# Unit = {
# Description = "Timer for Taskwarrior due notifications";
# };
# Timer = {
# OnBootSec = "1min";
# OnUnitActiveSec = "1min";
# AccuracySec = "30s";
# Persistent = true;
# };
# Install = {
# WantedBy = ["timers.target"];
# };
# };
systemd.user.services.task-due-notify = {
Unit = {
Description = "Check for due Taskwarrior tasks and notify";
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.bash}/bin/bash ${config.home.homeDirectory}/.local/bin/task-due-notify";
Environment = [
"PATH=${pkgs.gnugrep}/bin:${pkgs.gnused}/bin:${pkgs.coreutils}/bin:${pkgs.taskwarrior3}/bin:${pkgs.jq}/bin:${pkgs.curl}/bin:${pkgs.libnotify}/bin:/usr/bin:/bin"
"DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus"
];
};
};
systemd.user.services.kdeconnect-indicator = {
Unit = {
Description = "KDE Connect indicator";
@@ -140,39 +293,87 @@ dconf.settings."org/gnome/desktop/interface" = {
extraPackages = with pkgs; [ tree-sitter gcc gnumake];
};
programs.yazi = {
enable = true;
enableZshIntegration = true;
enableBashIntegration = true;
# This sets the command name for the wrapper.
# Many people use 'y' or 'yy' for quick access.
shellWrapperName = "y";
};
home.sessionVariables = {
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
iconTheme = {
name = "breeze-dark";
package = pkgs.kdePackages.breeze-icons;
};
};
qt = {
enable = true;
platformTheme.name = "gtk3";
style.name = "adwaita-dark";
};
# ---
# Packages (NOW list + a few safe essentials)
# ---
home.packages = with pkgs; [
# Input device support
libinput
seatd
# Audio controls
pamixer
playerctl
# Network
networkmanagerapplet
# System Monitoring
swaynotificationcenter # For notification daemon
libnotify
kdePackages.dolphin
kdePackages.kio-extras
kdePackages.kdegraphics-thumbnailers
kdePackages.ffmpegthumbs
kdePackages.ark
adwaita-qt
adwaita-qt6
kdePackages.breeze-icons
nushell
bun
pnpm
vite
python3Packages.beautifulsoup4
python3Packages.scrapy
python3Packages.pillow
python3Packages.playwright
# Python AI/ML packages
python3Packages.torch
python3Packages.torchvision
python3Packages.opencv4
# python3Packages.mediapipe
# CLI tools
# python3Packages.autogpt
vllm
# agentops
apache-airflow
python313Packages.langfuse
(callPackage ../../pkgs/cao-cli.nix { })
(callPackage ../../pkgs/agentops.nix { })
(callPackage ../../pkgs/mediapipe.nix { })
ollama
@@ -221,7 +422,7 @@ dconf.settings."org/gnome/desktop/interface" = {
zellij
tealdeer
navi
yazi
# yazi
dua
jq