config/modules/gui/clipboard.nix
2022-01-11 23:20:57 +00:00

24 lines
482 B
Nix

{ config, lib, pkgs, ... }:
(lib.mkIf (config.riley.gui) {
# Add some shell scripts that abstract away the
# horrible reality that the clipboard is managed by
# the display server.
users.users."riley".packages = with pkgs; [
(writeShellApplication {
name = "copy";
runtimeInputs = [ xclip ];
text = "xclip -sel clip -i";
})
(writeShellApplication {
name = "paste";
runtimeInputs = [ xclip ];
text = "xclip -sel clip -o";
})
];
})