nixos/modules/desktop/clipman.nix

29 lines
909 B
Nix
Raw Permalink Normal View History

2024-03-05 22:57:41 +01:00
{
home-manager,
lib,
pkgs,
...
}: {
2023-08-25 00:57:42 +02:00
# Clipboard manager. It can help persist clipboard contents after closing an
# application - which otherwise isn't supported in Wayland - but that breaks
# rich content copying in general. Therefore, we only use it for clipboard
2023-11-07 00:34:26 +01:00
# history with rofi as a frontend.
2023-08-23 23:22:12 +02:00
# https://github.com/yory8/clipman
home-manager.users.caspervk = {
services.clipman = {
enable = true;
};
2023-08-25 00:57:42 +02:00
# The home manager module doesn't use --no-persist, but it is required if
# you want to copy images. See:
2023-08-23 23:22:12 +02:00
# https://github.com/yory8/clipman/issues/59
# https://github.com/nix-community/home-manager/blob/master/modules/services/clipman.nix
systemd.user.services.clipman = {
Service = {
ExecStart = lib.mkForce "${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store --no-persist";
};
};
};
}