1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Dracon System Guard Policy
# Path: ~/.dracon/utilities/system/dracon-system.toml
#
# Controls disk monitoring, process protection, and auto-cleanup.
[]
# Enable the guard daemon
= true
# Seconds between guard check cycles
# interval_secs = 30
# Disk mount point to monitor (default: /nix on NixOS, / otherwise)
# disk_mount_path = "/nix"
# Disk usage thresholds (percent)
# Lower values = more aggressive early cleaning
= 65
= 75
= 85
= 92
# Freeze dracon-sync when disk hits action level
= true
# Unfreeze sync when disk drops below this level (set to ~warn_percent)
= 70
# Process monitoring thresholds
= 50.0 # Alert if CPU > 50%
= 4096 # Alert if RSS > 4GB
= 30 # Alert after 30s sustained
# Processes to exclude from monitoring (comma-separated)
= "systemd,dbus-daemon,Xorg,kwin_wayland,plasmashell,dracon-code"
# Auto-renice heavy processes (graduated: higher CPU/memory = higher nice value)
# CPU tiers: >=180% → nice 5, >=300% → nice 10, >=500% → nice 15
# Memory tiers: >=4GB → nice 5, >=8GB → nice 10
# renice_value is the fallback nice when no CPU/memory tier threshold is met
= true
= 5
= 120 # Un-renice after 2 min of being non-heavy
# Notifications
# notify_command must be an absolute path (e.g. /usr/bin/notify-send).
# For security, shell commands like "sh -c ..." are not allowed.
= true
= "/usr/bin/notify-send"
= 300
# Persistent logging of heavy processes
= "~/.local/state/dracon/dracon-system-guard.log"
= 1
# Auto-cleanup Rust target directories when disk is full
# ⚠️ auto_cleanup_apply must be true for the daemon to actually delete files.
# When false (default), the daemon only logs what it would clean.
= true
= false
= 256
= "~/Dev"
# Auto-cleanup old node_modules
= "~/Dev"
= 30
# Additional protected paths (besides system defaults)
# protected_paths = ["/mnt/data", "/opt/important"]
# Monitor inode usage
= true
= 85
# Monitor zombie processes
= true
= 20
# Monitor large log files
= true
= 100
= "/var/log,~/.local/share/opencode/log"
= false
= 50
= 0 # Lines to preserve when truncating logs
# Docker cleanup
= true
= false
# Package cache cleanup
= true
= true
= true
= 5
# Disk trend prediction
= true
= 24