From ca1c7cc23f6bf646f5f7e5e2230bc505aa0e77d4 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sat, 16 Nov 2024 23:47:26 +0000 Subject: [PATCH] add osc for copy paste over ssh --- flake.lock | 17 +++++++++++++++++ flake.nix | 8 ++++++++ modules/common/shell/utilities.nix | 1 + overlays/osc.nix | 15 +++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 overlays/osc.nix diff --git a/flake.lock b/flake.lock index 0b650cf..b63e56e 100644 --- a/flake.lock +++ b/flake.lock @@ -598,6 +598,22 @@ "type": "github" } }, + "osc": { + "flake": false, + "locked": { + "lastModified": 1731356260, + "narHash": "sha256-SvuHH/HfvQfK1Ob+aTjyvKnd1N2jaszpeTQ5SVHz9Mw=", + "owner": "theimpostor", + "repo": "osc", + "rev": "8a313c60d67353669509e9461d22b403df72b5e7", + "type": "github" + }, + "original": { + "owner": "theimpostor", + "repo": "osc", + "type": "github" + } + }, "ren": { "flake": false, "locked": { @@ -659,6 +675,7 @@ "nvim-lspconfig-src": "nvim-lspconfig-src", "nvim-tree-lua-src": "nvim-tree-lua-src", "nvim-treesitter-src": "nvim-treesitter-src", + "osc": "osc", "ren": "ren", "rep": "rep", "snipe-nvim-src": "snipe-nvim-src", diff --git a/flake.nix b/flake.nix index ad2c6b3..bffdefb 100644 --- a/flake.nix +++ b/flake.nix @@ -179,6 +179,7 @@ # Fixes: https://github.com/martinvonz/jj/issues/4784 jujutsu = { url = "github:martinvonz/jj"; + inputs.nixpkgs.follows = "nixpkgs"; }; # Ren and rep - CLI find and replace @@ -196,6 +197,12 @@ flake = false; }; + # Clipboard over SSH + osc = { + url = "github:theimpostor/osc"; + flake = false; + }; + # Nextcloud Apps nextcloud-news = { # https://github.com/nextcloud/news/releases @@ -274,6 +281,7 @@ (import ./overlays/nextcloud-apps.nix inputs) (import ./overlays/betterlockscreen.nix) (import ./overlays/gh-collaborators.nix inputs) + (import ./overlays/osc.nix inputs) (import ./overlays/ren-rep.nix inputs) ]; diff --git a/modules/common/shell/utilities.nix b/modules/common/shell/utilities.nix index d1b80e8..f88ab47 100644 --- a/modules/common/shell/utilities.nix +++ b/modules/common/shell/utilities.nix @@ -31,6 +31,7 @@ in jo # JSON output jq # JSON manipulation lf # File viewer + osc # Clipboard over SSH qrencode # Generate qr codes rsync # Copy folders ren # Rename files diff --git a/overlays/osc.nix b/overlays/osc.nix new file mode 100644 index 0000000..efaafb3 --- /dev/null +++ b/overlays/osc.nix @@ -0,0 +1,15 @@ +inputs: _final: prev: { + + osc = prev.buildGoModule { + pname = "osc"; + version = "v0.4.4"; + src = inputs.osc; + + vendorHash = "sha256-VEzVd1LViMtqhQaltvGuupEemV/2ewMuVYjGbKOi0iw="; + + ldflags = [ + "-s" + "-w" + ]; + }; +}