diff options
| author | adikro <adikro@disroot.org> | 2025-12-20 03:14:45 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2025-12-20 03:14:45 +0100 |
| commit | 791bc419b6dac7c70951981ef6b34cdf85828470 (patch) | |
| tree | 56d0962fdf829ae942feb1344763e54dbc3c89a3 /hm/conf/clip.nix | |
| parent | e60410393cea222b16743a1a87f29c06b9b3543b (diff) | |
absolutely massive rewrite, made (almost) everything modular with changes to come
Diffstat (limited to 'hm/conf/clip.nix')
| -rw-r--r-- | hm/conf/clip.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/hm/conf/clip.nix b/hm/conf/clip.nix new file mode 100644 index 0000000..82de671 --- /dev/null +++ b/hm/conf/clip.nix @@ -0,0 +1,32 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.szpont.hm.conf.clipboard; +in +{ + options.szpont.hm.conf.clipboard = { + enable = lib.mkEnableOption "cliphist clipboard history"; + + backend = lib.mkOption { + type = lib.types.enum [ "wayland" "x11" "both" ]; + default = "both"; + description = "which clipboard backend tools to install"; + }; + }; + + config = lib.mkIf cfg.enable { + services.cliphist = { + enable = true; + allowImages = true; + systemdTargets = "graphical-session.target"; + }; + + home.packages = lib.mkMerge [ + (lib.mkIf (cfg.backend == "wayland" || cfg.backend == "both") [ + pkgs.wl-clipboard + ]) + (lib.mkIf (cfg.backend == "x11" || cfg.backend == "both") [ + pkgs.xclip + ]) + ]; + }; +} |
