mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 18:30:46 +02:00
15 lines
403 B
Nix
15 lines
403 B
Nix
# creates and maintains cache file for the notification history
|
|
{writeShellApplication, ...}:
|
|
writeShellApplication {
|
|
name = "QS-notifycache";
|
|
runtimeInputs = [
|
|
];
|
|
text = ''
|
|
CACHE="$HOME/.cache/notify_history"
|
|
# Create or erase existing cache
|
|
mkdir -p "$(dirname "$CACHE")"
|
|
: > "$CACHE" # truncate file
|
|
echo "Notification history initialized at $(date)" >> "$CACHE"
|
|
'';
|
|
}
|