aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/services/flameshot.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/modules/services/flameshot.nix')
-rw-r--r--home-manager/modules/services/flameshot.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/home-manager/modules/services/flameshot.nix b/home-manager/modules/services/flameshot.nix
new file mode 100644
index 00000000000..87b494d0fcd
--- /dev/null
+++ b/home-manager/modules/services/flameshot.nix
@@ -0,0 +1,47 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.services.flameshot;
+ package = pkgs.flameshot;
+
+in
+
+{
+ meta.maintainers = [ maintainers.hamhut1066 ];
+
+ options = {
+ services.flameshot = {
+ enable = mkEnableOption "Flameshot";
+ };
+ };
+
+ config = mkIf cfg.enable {
+ home.packages = [ package ];
+
+ systemd.user.services.flameshot = {
+ Unit = {
+ Description = "Flameshot screenshot tool";
+ After = [
+ "graphical-session-pre.target"
+ "polybar.service"
+ "stalonetray.service"
+ "taffybar.service"
+ ];
+ PartOf = [ "graphical-session.target" ];
+ };
+
+ Install = {
+ WantedBy = [ "graphical-session.target" ];
+ };
+
+ Service = {
+ Environment = "PATH=${config.home.profileDirectory}/bin";
+ ExecStart = "${package}/bin/flameshot";
+ Restart = "on-abort";
+ };
+ };
+ };
+}