flameshot: add darwin support
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
0825a0922a
commit
2363f5a377
1 changed files with 14 additions and 5 deletions
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue