mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
flameshot: add darwin support
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user