
GPaste GNOME Shell extension uses GPaste library generated via introspection. Previously, we added the gpaste package to services.xserver.desktopManager.gnome3.sessionPath option, which added its typelib directory to GI_TYPELIB_PATH environment variable globally, in order for GNOME Shell to be able to find it. This is not very Nix-y, though, so we have decided to patch the code to append the path to the GI repository search path. Additionally, the code relies on GPaste’s GSettings schemas, so we had to hard-code the paths to them as well. We ignored the GNOME Shell’s schemas, since they will already be available for the extension inside GNOME Shell program.
27 lines
560 B
Nix
27 lines
560 B
Nix
# GPaste daemon.
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
###### interface
|
|
options = {
|
|
services.gnome3.gpaste = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = ''
|
|
Whether to enable GPaste, a clipboard manager.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
###### implementation
|
|
config = mkIf config.services.gnome3.gpaste.enable {
|
|
environment.systemPackages = [ pkgs.gnome3.gpaste ];
|
|
services.dbus.packages = [ pkgs.gnome3.gpaste ];
|
|
systemd.packages = [ pkgs.gnome3.gpaste ];
|
|
};
|
|
}
|