nixpkgs/nixos/modules/programs/gpaste.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1,010 B
Nix
Raw Normal View History

2019-08-09 18:43:00 +02:00
# GPaste.
{ config, lib, pkgs, ... }:
2017-09-02 16:54:03 +02:00
with lib;
{
2019-08-09 18:43:00 +02:00
# Added 2019-08-09
imports = [
(mkRenamedOptionModule
[ "services" "gnome3" "gpaste" "enable" ]
[ "programs" "gpaste" "enable" ])
];
2017-09-02 16:54:03 +02:00
###### interface
options = {
2019-08-09 18:43:00 +02:00
programs.gpaste = {
2017-09-02 16:54:03 +02:00
enable = mkOption {
type = types.bool;
default = false;
description = ''
2017-09-02 16:54:03 +02:00
Whether to enable GPaste, a clipboard manager.
'';
};
};
};
###### implementation
2019-08-09 18:43:00 +02:00
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 ];
2017-09-02 16:54:03 +02:00
};
}