about summary refs log tree commit diff
path: root/nixos/modules/programs/gpaste.nix
blob: 38dc0488c68a775c369e5b67e7d20078f8199569 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# GPaste.
{ config, lib, pkgs, ... }:

with lib;

{

  ###### interface
  options = {
     programs.gpaste = {
      enable = mkOption {
        type = types.bool;
        default = false;
        description = ''
          Whether to enable GPaste, a clipboard manager.
        '';
      };
    };
  };

  ###### implementation
  config = mkIf config.programs.gpaste.enable {
    environment.systemPackages = [ pkgs.gnome.gpaste ];
    services.dbus.packages = [ pkgs.gnome.gpaste ];
    systemd.packages = [ pkgs.gnome.gpaste ];
    # gnome-control-center crashes in Keyboard Shortcuts pane without the GSettings schemas.
    services.xserver.desktopManager.gnome.sessionPath = [ pkgs.gnome.gpaste ];
    # gpaste-reloaded applet doesn't work without the typelib
    services.xserver.desktopManager.cinnamon.sessionPath = [ pkgs.gnome.gpaste ];
  };
}