home/editor: add system clipboard support
This commit is contained in:
parent
7b5e4d52d1
commit
2a5d4d6790
1 changed files with 17 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
|||
{ inputs, lib, pkgs, ... }:
|
||||
let
|
||||
|
||||
package = inputs.helix.defaultPackage.${pkgs.system};
|
||||
|
||||
clipboardProvider = pkgs.wl-clipboard;
|
||||
|
||||
hx = {
|
||||
config = {
|
||||
theme = "custom";
|
||||
|
@ -21,9 +26,20 @@ let
|
|||
json = pkgs.writeText "helix-${name}.json" (builtins.toJSON value);
|
||||
in pkgs.runCommandNoCC "helix-${name}.toml" {} "${pkgs.remarshal}/bin/remarshal --if json --of toml -i ${json} -o $out";
|
||||
|
||||
path = lib.makeBinPath [ clipboardProvider ];
|
||||
|
||||
# weird double-wrapping because nix-cargo-integration isn't overridable
|
||||
finalPackage = pkgs.runCommandNoCC package.name {
|
||||
nativeBuildInputs = [
|
||||
pkgs.makeWrapper
|
||||
];
|
||||
} ''
|
||||
makeWrapper ${package}/bin/hx $out/bin/hx \
|
||||
--prefix PATH : ${path}
|
||||
'';
|
||||
in {
|
||||
home.packages = [
|
||||
inputs.helix.defaultPackage.${pkgs.system}
|
||||
finalPackage
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
|
|
Loading…
Reference in a new issue