flameshot: add darwin support

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2026-02-11 23:19:22 -06:00
parent 0825a0922a
commit 2363f5a377

View file

@ -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;
};
};
};
}