From 7dcfd82a90b98992165d2be4b47826f6a1f1319f Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Fri, 3 Jan 2025 22:52:44 -0500 Subject: [PATCH] cy --- cy/cy.janet | 1 + nix/home-manager/modules/files.nix | 1 + nix/home-manager/modules/packages/default.nix | 34 +++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 cy/cy.janet diff --git a/cy/cy.janet b/cy/cy.janet new file mode 100644 index 0000000..75d98b1 --- /dev/null +++ b/cy/cy.janet @@ -0,0 +1 @@ +(key/bind :root ["ctrl+a" "p"] action/command-palette) diff --git a/nix/home-manager/modules/files.nix b/nix/home-manager/modules/files.nix index fc76ab0..2e71e2d 100644 --- a/nix/home-manager/modules/files.nix +++ b/nix/home-manager/modules/files.nix @@ -58,6 +58,7 @@ in { [[ssh-keys]] item = "mpf42t6kn2hxijw5jsqti4hxfm" ''; + "cy/cyrc.janet".source = ./${repo_root}/cy/cy.janet; "doom/init.el" = { source = ./${repo_root}/emacs/emacs.doom/init.el; onChange = "~/.emacs.d/bin/doom sync"; diff --git a/nix/home-manager/modules/packages/default.nix b/nix/home-manager/modules/packages/default.nix index e4b2d2d..d114275 100644 --- a/nix/home-manager/modules/packages/default.nix +++ b/nix/home-manager/modules/packages/default.nix @@ -5,6 +5,38 @@ # ncdu (well, all zig packages) don't work on macOS nix right now then [zsh racket mold ncdu ghostty] else [keka colima neovide aerospace]; + cy = { + pkgs, + fetchFromGitHub, + }: let + ver = "1.3.1"; + in + pkgs.buildGoModule { + pname = "cy"; + version = "${ver}"; + + src = fetchFromGitHub { + owner = "cfoust"; + repo = "cy"; + rev = "refs/tags/v${ver}"; + hash = "sha256-W7xCAeoBn6nrSzkBX59qulIcgigeHhaaa38vfEEuaAQ="; + }; + + vendorHash = null; + + buildPhase = '' + runHook preBuild + export GOCACHE=$PWD/.cache/go-build + go install ./cmd/cy/ + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + install -Dm755 -t $out/bin $GOPATH/bin/cy + runHook postInstall + ''; + }; in { imports = [ ./git.nix @@ -14,6 +46,7 @@ in { ./starship.nix ./zellij.nix ./zsh.nix + # ./cy.nix ]; home.packages = with pkgs; [ @@ -24,6 +57,7 @@ in { cargo-workspaces clipboard-jh curl + (callPackage cy {}) departure-mono docker-client dogedns