nixos/home/modules/flameshot.nix

30 lines
692 B
Nix
Raw Normal View History

2024-07-31 06:09:02 +00:00
{ lib, config, pkgs, ... }:
let
cfg = config.snowhawk.flameshot;
in
{
options.snowhawk.flameshot = {
enable = lib.mkEnableOption "flameshot home-manager module";
config = lib.mkOption {
2024-07-31 06:14:28 +00:00
type = with lib.types; attrsOf attrs;
2024-07-31 06:09:02 +00:00
description = "the flameshot config as an attrs of attrs";
default = {
General = {
contrastOpacity = 188;
contrastUiColor = "#8affc1";
drawColor = "#00ff00";
uiColor = "#007d96";
};
};
2024-07-31 06:09:02 +00:00
};
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ flameshot ];
2024-07-31 06:15:14 +00:00
xdg.configFile."flameshot/flameshot.ini".text = lib.generators.toINI { } cfg.config;
2024-07-31 06:09:02 +00:00
};
}