{ pkgs, config, lib, ... }: with lib; let unstablePkgs = import {}; library = import { inherit pkgs lib; }; #seafileClient = unstablePkgs.seafile-client.override{ # seafile-shared = unstablePkgs.seafile-shared; #}; seafileClient = pkgs.seafile-client.override{ seafile-shared = pkgs.seafile-shared; }; replaceLinks = pkgs.writers.writeBashBin "replace-link-with-content" /* sh */ '' if [ ! -L "$1" ] then echo "$1 does not exist or is not a file" exit 1 fi cp -rL "$1" "$1.backup" unlink "$1" mv "$1.backup" "$1" ''; pandocScript = inputFormat: outputFormat: pkgs.writers.writeDashBin "pandoc-from-${inputFormat}-to-${outputFormat}" '' ${pkgs.pandoc}/bin/pandoc \ --from ${inputFormat} \ --to ${outputFormat} \ --standalone \ "$@" ''; # show keyboard input on desktop for screencasts screenKey = pkgs.symlinkJoin { name = "screen-keys"; paths = let screenKeyScript = { position ? "bottom", size ? "small", ... }: pkgs.writeShellScriptBin "screenkeys-${position}-${size}" /* sh */ '' ${pkgs.screenkey}/bin/screenkey \ --no-detach \ --bg-color '#fdf6e3' \ --font-color '#073642' \ -p ${position} \ -s ${size} \ "$@" ''; in lib.flatten ( lib.flip map [ "large" "small" "medium" ] ( size: lib.flip map [ "top" "center" "bottom" ] ( position: screenKeyScript { inherit size position ;} ) ) ); }; connectToSpeaker = name: id: pkgs.writeShellScriptBin "connect-to-speaker-${name}" /* sh */ '' # hacky script because I have problems with # automatically connecting to trusted bluetooth devices. echo "Connect to Speaker ${name}" bluetoothctl <)) screenKey replaceLinks (pkgs.pidgin-with-plugins.override { ## Add whatever plugins are desired (see nixos.org package listing). plugins = [ pkgs.pidgin-otr pkgs.purple-facebook pkgs.purple-discord pkgs.purple-matrix pkgs.purple-hangouts pkgs.pidgin-latex pkgs.pidgin-opensteamworks pkgs.pidgin-skypeweb pkgs.telegram-purple pkgs.purple-lurch ]; }) haskellPackages.image-generator memo ] ++ (lib.crossLists pandocScript [ ["markdown" "mediawiki"] ["mediawiki" "docbook5" "html5" "man"] ]); }