diff --git a/boxes/desktop/home.nix b/boxes/desktop/home.nix index 472cb32..463d4be 100644 --- a/boxes/desktop/home.nix +++ b/boxes/desktop/home.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, inputs, ... }: let + flameshot = import ../../common/programs/flameshot.nix {inherit config;}; _s1 = import ../../common/sops.nix { inherit config; }; files = import ../../common/files.nix { inherit config; }; shell = import ../../common/shell.nix { inherit config pkgs; }; @@ -53,13 +54,7 @@ nixpkgs.config.allowInsecurePredicate = (pkg: true); services = { - flameshot = { - enable = true; - settings.General.showDesktopNotification = false; - settings.General.startupLaunch = false; - # settings.Shortcuts.TYPE_IMAGEUPLOADER = ""; - # settings.Shortcuts.TYPE_COPY = "Return"; - }; + inherit flameshot; }; # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release diff --git a/common/pkgs.nix b/common/pkgs.nix index 044a298..e848872 100644 --- a/common/pkgs.nix +++ b/common/pkgs.nix @@ -127,7 +127,7 @@ in set -euo pipefail TEMP=$(mktemp) flameshot gui -s -r > $TEMP - (tesseract $TEMP - --oem 1 -l eng | copy )|| copy "OCR RETUNRED NON-ZERO" + (tesseract $TEMP /dev/null --oem 1 -l eng | copy )|| copy "OCR RETUNRED NON-ZERO" '') ]; wsl = with pkgs;[ diff --git a/common/programs/flameshot.nix b/common/programs/flameshot.nix new file mode 100644 index 0000000..d14750e --- /dev/null +++ b/common/programs/flameshot.nix @@ -0,0 +1,11 @@ +{config}: { + enable = true; + settings = { + General = { + savePath="/home/${config.home.username}/ss/"; + saveAsFileExtension=".png"; + showDesktopNotification=false; + startupLaunch=true; + }; + }; +}