summary refs log tree commit diff
path: root/nixos/modules/programs/gpaste.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/programs/gpaste.nix')
-rw-r--r--nixos/modules/programs/gpaste.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixos/modules/programs/gpaste.nix b/nixos/modules/programs/gpaste.nix
new file mode 100644
index 00000000000..cff2fb8d003
--- /dev/null
+++ b/nixos/modules/programs/gpaste.nix
@@ -0,0 +1,36 @@
+# GPaste.
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+
+  # Added 2019-08-09
+  imports = [
+    (mkRenamedOptionModule
+      [ "services" "gnome3" "gpaste" "enable" ]
+      [ "programs" "gpaste" "enable" ])
+  ];
+
+  ###### 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 ];
+  };
+}