{ 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 = "c"; runtimeInputs = [ xclip ]; text = "xclip -sel clip -i"; }) (writeShellApplication { name = "p"; runtimeInputs = [ xclip ]; text = "xclip -sel clip -o"; }) (writeShellApplication { name = "sc"; runtimeInputs = [ xclip scrot ]; text = '' scrot -zso /tmp/sc.png xclip -t "image/png" -sel clip -i < /tmp/sc.png ''; }) ]; })