From 7488b6f44fab0c36142587f60092236aeda4fecb Mon Sep 17 00:00:00 2001 From: Caroline Larimore Date: Fri, 7 Feb 2025 22:34:28 -0800 Subject: migration: flameshot --- snowfall/modules/home/apps/flameshot/default.nix | 38 ++++++++++++++++++++++++ snowfall/modules/home/suites/desktop/default.nix | 1 + 2 files changed, 39 insertions(+) create mode 100644 snowfall/modules/home/apps/flameshot/default.nix (limited to 'snowfall') diff --git a/snowfall/modules/home/apps/flameshot/default.nix b/snowfall/modules/home/apps/flameshot/default.nix new file mode 100644 index 0000000..9a91604 --- /dev/null +++ b/snowfall/modules/home/apps/flameshot/default.nix @@ -0,0 +1,38 @@ +{ options, config, lib, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.apps.flameshot; + desktop = config.${namespace}.desktop; +in { + options.${namespace}.apps.flameshot = with types; { + enable = mkEnableOption "flameshot"; + }; + + config = mkIf cfg.enable { + services.flameshot = { + enable = true; + + settings = let c = desktop.theme.colors; in { + General = { + savePath = "Pictures/Screenshots"; + filenamePattern = "%F_%T"; + + saveAfterCopy = true; + + uiColor = "#${c.bg}"; + contrastUiColor = "#${c.accent}"; + + startupLaunch = false; + }; + }; + }; + + #TODO: relocate. target.tray required for flameshot + systemd.user.targets.tray = { + Unit = { + Description = "Home Manager System Tray"; + Requires = [ "graphical-session-pre.target" ]; + }; + }; + }; +} diff --git a/snowfall/modules/home/suites/desktop/default.nix b/snowfall/modules/home/suites/desktop/default.nix index 244c56c..2e73ad0 100644 --- a/snowfall/modules/home/suites/desktop/default.nix +++ b/snowfall/modules/home/suites/desktop/default.nix @@ -17,6 +17,7 @@ in { picom.enable = true; kitty.enable = true; + flameshot.enable = true; }; }; }; -- cgit v1.2.3