aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roles/home/desktop/default.nix4
-rw-r--r--roles/home/desktop/flameshot.nix27
-rw-r--r--snowfall/modules/home/apps/flameshot/default.nix38
-rw-r--r--snowfall/modules/home/suites/desktop/default.nix1
4 files changed, 39 insertions, 31 deletions
diff --git a/roles/home/desktop/default.nix b/roles/home/desktop/default.nix
index 484def5..277c17d 100644
--- a/roles/home/desktop/default.nix
+++ b/roles/home/desktop/default.nix
@@ -63,10 +63,6 @@ let cfg = config.home.roles.desktop; in {
fastfetch.enable = cfg.fetch;
};
- services = {
- flameshot.enable = cfg.screenshot;
- };
-
home = {
packages = with pkgs; [
(writeShellScriptBin "switch-theme" ''
diff --git a/roles/home/desktop/flameshot.nix b/roles/home/desktop/flameshot.nix
deleted file mode 100644
index d079fc9..0000000
--- a/roles/home/desktop/flameshot.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ config, ... }:
-
-{
- services.flameshot = {
- settings = let c = config.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/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;
};
};
};