diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 81d170a..626f6c4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v19 + - uses: cachix/install-nix-action@v20 with: extra_nix_config: | accept-flake-config = true diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml index 1d839ea..09c1dea 100644 --- a/.github/workflows/update.yaml +++ b/.github/workflows/update.yaml @@ -1,4 +1,5 @@ name: update-flake-lock + on: workflow_dispatch: # allows manual triggering schedule: @@ -11,19 +12,35 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v19 + - uses: cachix/install-nix-action@v20 with: extra_nix_config: | accept-flake-config = true + - uses: cachix/cachix-action@v12 with: name: aciceri-emacs authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Update flake.lock - uses: DeterminateSystems/update-flake-lock@v16 + uses: aciceri/update-flake-lock@main with: + custom-logic: | + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + echo "DIFF_CLOSURES<<$EOF" >> $GITHUB_ENV + nix run .#diff-closures | sed 's/^ *//g' >> $GITHUB_ENV + echo "$EOF" >> $GITHUB_ENV pr-title: "Automatic `flake.lock` update" + pr-body: | + # Automatic update + ## Inputs updated + ``` + {{ env.GIT_COMMIT_MESSAGE }} + ``` + ## Closures diff + ``` + {{ env.DIFF_CLOSURES }} + ``` pr-labels: | flake-inputs automatic diff --git a/diff-closures/default.nix b/diff-closures/default.nix new file mode 100644 index 0000000..274c48a --- /dev/null +++ b/diff-closures/default.nix @@ -0,0 +1,20 @@ +{inputs, ...}: { + perSystem = { + pkgs, + self', + ... + }: { + packages.diff-closures = pkgs.writeShellApplication { + name = "diff-closures"; + runtimeInputs = [ pkgs.ansifilter ]; + text = '' + nix store diff-closures --derivation \ + github:aciceri/emacs/master#ccrEmacs \ + "${inputs.self}#ccrEmacs" \ + | ansifilter --text + ''; + }; + + apps.diff-closures.program = "${self'.packages.diff-closures}/bin/diff-closures"; + }; +} diff --git a/flake.lock b/flake.lock index 7ddb116..b0e98c7 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1677061209, - "narHash": "sha256-WIddVDpQy1d5xA/hKT8z9WwqlcP+RRIAy0cTUtWU7bg=", + "lastModified": 1678296165, + "narHash": "sha256-nEU+1PKIvYfD+oQ53KO13J2LwMPzUgWc89tFzrES9K4=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "6c39228d24c69ff0d52aedb8c9976bb796ebda2a", + "rev": "5b3d95676be5c6963c4d16f21ecf82beb14c6c05", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 07d778f..ed34727 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,7 @@ ./packages ./hmModules ./formatter + ./diff-closures ]; }; @@ -34,5 +35,6 @@ "aciceri-emacs.cachix.org-1:kxDGDFWV6LUj41tb8xmPRBI56UJSZOVveN49LZDUKdA=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; + }; } diff --git a/init.el b/init.el index 762ffab..791d7f2 100644 --- a/init.el +++ b/init.el @@ -41,7 +41,6 @@ (setup flycheck (:require flycheck) (:hook-into prog-mode) - ;; FIXME the following requires the same fix as `fira-code-mode` (if (display-graphic-p) (:hook flycheck-posframe-mode) (:hook flycheck-inline-mode))) (setup eglot @@ -168,6 +167,10 @@ "C-c w l" #'windmove-right "C-c w j" #'windmove-down "C-c w h" #'windmove-left + "M-k" #'windmove-up + "M-l" #'windmove-right + "M-j" #'windmove-down + "M-h" #'windmove-left "C-c w " #'windmove-up "C-c w " #'windmove-right "C-c w " #'windmove-down @@ -261,18 +264,10 @@ cape-dabbrev-min-length 5)) (setup eshell - (defun ccr/eshell-new () - "Open a new instance of eshell" - (interactive) - (eshell 'N)) - (defun ccr/vterm-new () - "Open a new instance of vterm" - (interactive) - (vterm 'N)) (:hook esh-autosuggest-mode) (eshell-syntax-highlighting-global-mode +1) - (:global "C-c o e" ccr/eshell-new - "C-c o t" ccr/vterm-new)) + (:global "C-c o e" #'projectile-run-eshell + "C-c o t" #'projectile-run-vterm)) (setup vterm (:option vterm-timer-delay 0.01)) @@ -283,11 +278,18 @@ (setup yaml-mode (add-to-list 'auto-mode-alist '("\\.y(a?)ml\\'" . yaml-mode)) (add-hook 'yaml-mode-hook ;; TODO use a more idiomatic style according to setup.el - '(lambda () + #'(lambda () (define-key yaml-mode-map "\C-m" 'newline-and-indent)))) (setup hl-todo (global-hl-todo-mode)) +(setup projectile + (:option projectile-project-search-path '("~/projects/" "~/mlabs/")) + ;; (:bind-into projectile-command-map + ;; "DEL" #'vertico-directory-delete-char + ;; "C-DEL" #'vertico-directory-delete-word) + ) + (setup meow (:require meow) (:option meow-cheatsheet-layout meow-cheatsheet-layout-qwerty) diff --git a/packages/packages.nix b/packages/packages.nix index cf2d996..3ff70e4 100644 --- a/packages/packages.nix +++ b/packages/packages.nix @@ -43,9 +43,10 @@ with epkgs; [ diredfl pdf-tools ligature - esh-autosuggest eshell-syntax-highlighting + projectile + consult-projectile # TODO playing with these sway