From 2363f5a3772d230051bd0f8447585848fb99b0f9 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Wed, 11 Feb 2026 23:19:22 -0600 Subject: [PATCH] flameshot: add darwin support Signed-off-by: Austin Horstman --- modules/services/flameshot.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/modules/services/flameshot.nix b/modules/services/flameshot.nix index 664f63fa..65954b13 100644 --- a/modules/services/flameshot.nix +++ b/modules/services/flameshot.nix @@ -39,10 +39,6 @@ in }; config = lib.mkIf cfg.enable { - assertions = [ - (lib.hm.assertions.assertPlatform "services.flameshot" pkgs lib.platforms.linux) - ]; - home.packages = [ cfg.package ]; xdg.configFile = lib.mkIf (cfg.settings != { }) { @@ -67,7 +63,7 @@ in Service = { Environment = [ "PATH=${config.home.profileDirectory}/bin" ]; - ExecStart = "${cfg.package}/bin/flameshot"; + ExecStart = lib.getExe cfg.package; Restart = "on-abort"; # Sandboxing. @@ -80,5 +76,18 @@ in SystemCallFilter = "@system-service"; }; }; + + launchd.agents.flameshot = { + enable = true; + config = { + ProgramArguments = [ (lib.getExe cfg.package) ]; + KeepAlive = { + Crashed = true; + SuccessfulExit = false; + }; + ProcessType = "Interactive"; + RunAtLoad = true; + }; + }; }; }