powerful but friendly backup program that runs in your tray, powered by restic devins.page/restray
go restic system-tray
2

Configure Feed

Select the types of activity you want to include in your feed.

feat: gui options in nix modules

intergrav (Jul 2, 2026, 12:44 AM EDT) a7378db6 c5e502a1

+62 -4
+7 -1
nix/hm-module.nix
··· 21 21 default = {}; 22 22 description = "Restray backup profiles."; 23 23 }; 24 + 25 + gui = lib.mkOption { 26 + type = lib.types.submodule shared.guiOpts; 27 + default = {}; 28 + description = "GUI-only settings, ignored by restray daemon."; 29 + }; 24 30 }; 25 31 26 32 options.services.restray.enable = lib.mkEnableOption "Restray backup scheduler daemon"; ··· 32 38 33 39 (lib.mkIf cfg.enable { 34 40 home.packages = [cfg.package]; 35 - home.file."${configDir}/config.toml".source = shared.configFile cfg.profiles; 41 + home.file."${configDir}/config.toml".source = shared.configFile cfg.profiles cfg.gui; 36 42 }) 37 43 38 44 (lib.mkIf (daemon.enable && cfg.enable) {
+7 -1
nix/nixos-module.nix
··· 16 16 default = {}; 17 17 description = "Restray backup profiles."; 18 18 }; 19 + 20 + gui = lib.mkOption { 21 + type = lib.types.submodule shared.guiOpts; 22 + default = {}; 23 + description = "GUI-only settings, ignored by restray daemon."; 24 + }; 19 25 }; 20 26 21 27 config = lib.mkIf cfg.enable { ··· 43 49 }; 44 50 }; 45 51 46 - environment.etc."restray/config.toml".source = shared.configFile cfg.profiles; 52 + environment.etc."restray/config.toml".source = shared.configFile cfg.profiles cfg.gui; 47 53 }; 48 54 }
+48 -2
nix/shared.nix
··· 2 2 lib, 3 3 pkgs, 4 4 }: let 5 + guiOpts = { 6 + options = { 7 + checkUpdates = lib.mkOption { 8 + type = lib.types.bool; 9 + default = true; 10 + description = "MacOS/Windows only. Check for new Restray versions on startup and periodically. When an update is found, the version item in the menu changes to an update button"; 11 + }; 12 + manageRestic = lib.mkOption { 13 + type = lib.types.bool; 14 + default = false; 15 + description = "Windows only. If restic is not found in PATH, automatically downloads and updates a self-managed restic binary daily from GitHub."; 16 + }; 17 + notifications = lib.mkOption { 18 + type = lib.types.str; 19 + default = "none"; 20 + description = ''"all" (success + errors), "errors" (errors only), or "none" (silent)''; 21 + }; 22 + icon = lib.mkOption { 23 + type = lib.types.str; 24 + default = ""; 25 + description = ''"color", "mono", "white", or "black". Default is "mono" on MacOS/Windows and "color" elsewhere. "mono" follows OS light/dark mode.''; 26 + }; 27 + scheduleDisplay = lib.mkOption { 28 + type = lib.types.str; 29 + default = "description"; 30 + description = ''"description" (human-readable, e.g. "every 6 hours"), "cron" (raw expression, e.g. "0 * * * *"), "last" (time since last backup, e.g. "2 hours ago"), or "none"''; 31 + }; 32 + terminal = lib.mkOption { 33 + type = lib.types.str; 34 + default = ""; 35 + description = ''Terminal emulator used in "Shell" and "View Log". If unset, MacOS will use Terminal.app. Linux will use default. Not used on Windows. e.g. "Ghostty"''; 36 + }; 37 + }; 38 + }; 39 + 5 40 profileOpts = {name, ...}: { 6 41 options = { 7 42 name = lib.mkOption { ··· 140 175 mount.args = prof.mount.args; 141 176 }; 142 177 178 + guiToToml = gui: 179 + lib.filterAttrsRecursive (_: v: v != null && v != [] && v != "") { 180 + check_updates = gui.checkUpdates; 181 + manage_restic = gui.manageRestic; 182 + notifications = gui.notifications; 183 + icon = gui.icon; 184 + schedule_display = gui.scheduleDisplay; 185 + terminal = gui.terminal; 186 + }; 187 + 143 188 toml = pkgs.formats.toml {}; 144 189 145 - configFile = profiles: 190 + configFile = profiles: gui: 146 191 toml.generate "restray-config.toml" { 147 192 profiles = lib.mapAttrsToList profileToToml profiles; 193 + gui = guiToToml gui; 148 194 }; 149 195 in { 150 - inherit profileOpts configFile; 196 + inherit profileOpts guiOpts configFile; 151 197 }