[CI] Testing flake-update showing dynamic contents

This commit is contained in:
Andrea Ciceri 2023-03-09 00:23:02 +01:00
parent a412295c6d
commit fcd3b8be20
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
7 changed files with 61 additions and 19 deletions

View file

@ -14,7 +14,7 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: cachix/install-nix-action@v19 - uses: cachix/install-nix-action@v20
with: with:
extra_nix_config: | extra_nix_config: |
accept-flake-config = true accept-flake-config = true

View file

@ -1,4 +1,5 @@
name: update-flake-lock name: update-flake-lock
on: on:
workflow_dispatch: # allows manual triggering workflow_dispatch: # allows manual triggering
schedule: schedule:
@ -11,19 +12,35 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: cachix/install-nix-action@v19 - uses: cachix/install-nix-action@v20
with: with:
extra_nix_config: | extra_nix_config: |
accept-flake-config = true accept-flake-config = true
- uses: cachix/cachix-action@v12 - uses: cachix/cachix-action@v12
with: with:
name: aciceri-emacs name: aciceri-emacs
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Update flake.lock - name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v16 uses: aciceri/update-flake-lock@main
with: 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-title: "Automatic `flake.lock` update"
pr-body: |
# Automatic update
## Inputs updated
```
{{ env.GIT_COMMIT_MESSAGE }}
```
## Closures diff
```
{{ env.DIFF_CLOSURES }}
```
pr-labels: | pr-labels: |
flake-inputs flake-inputs
automatic automatic

20
diff-closures/default.nix Normal file
View file

@ -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";
};
}

6
flake.lock generated
View file

@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1677061209, "lastModified": 1678296165,
"narHash": "sha256-WIddVDpQy1d5xA/hKT8z9WwqlcP+RRIAy0cTUtWU7bg=", "narHash": "sha256-nEU+1PKIvYfD+oQ53KO13J2LwMPzUgWc89tFzrES9K4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "6c39228d24c69ff0d52aedb8c9976bb796ebda2a", "rev": "5b3d95676be5c6963c4d16f21ecf82beb14c6c05",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -22,6 +22,7 @@
./packages ./packages
./hmModules ./hmModules
./formatter ./formatter
./diff-closures
]; ];
}; };
@ -34,5 +35,6 @@
"aciceri-emacs.cachix.org-1:kxDGDFWV6LUj41tb8xmPRBI56UJSZOVveN49LZDUKdA=" "aciceri-emacs.cachix.org-1:kxDGDFWV6LUj41tb8xmPRBI56UJSZOVveN49LZDUKdA="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
]; ];
}; };
} }

26
init.el
View file

@ -41,7 +41,6 @@
(setup flycheck (setup flycheck
(:require flycheck) (:require flycheck)
(:hook-into prog-mode) (: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))) (if (display-graphic-p) (:hook flycheck-posframe-mode) (:hook flycheck-inline-mode)))
(setup eglot (setup eglot
@ -168,6 +167,10 @@
"C-c w l" #'windmove-right "C-c w l" #'windmove-right
"C-c w j" #'windmove-down "C-c w j" #'windmove-down
"C-c w h" #'windmove-left "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 <up>" #'windmove-up "C-c w <up>" #'windmove-up
"C-c w <right>" #'windmove-right "C-c w <right>" #'windmove-right
"C-c w <down>" #'windmove-down "C-c w <down>" #'windmove-down
@ -261,18 +264,10 @@
cape-dabbrev-min-length 5)) cape-dabbrev-min-length 5))
(setup eshell (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) (:hook esh-autosuggest-mode)
(eshell-syntax-highlighting-global-mode +1) (eshell-syntax-highlighting-global-mode +1)
(:global "C-c o e" ccr/eshell-new (:global "C-c o e" #'projectile-run-eshell
"C-c o t" ccr/vterm-new)) "C-c o t" #'projectile-run-vterm))
(setup vterm (setup vterm
(:option vterm-timer-delay 0.01)) (:option vterm-timer-delay 0.01))
@ -283,11 +278,18 @@
(setup yaml-mode (setup yaml-mode
(add-to-list 'auto-mode-alist '("\\.y(a?)ml\\'" . 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 (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)))) (define-key yaml-mode-map "\C-m" 'newline-and-indent))))
(setup hl-todo (global-hl-todo-mode)) (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 (setup meow
(:require meow) (:require meow)
(:option meow-cheatsheet-layout meow-cheatsheet-layout-qwerty) (:option meow-cheatsheet-layout meow-cheatsheet-layout-qwerty)

View file

@ -43,9 +43,10 @@ with epkgs; [
diredfl diredfl
pdf-tools pdf-tools
ligature ligature
esh-autosuggest esh-autosuggest
eshell-syntax-highlighting eshell-syntax-highlighting
projectile
consult-projectile
# TODO playing with these # TODO playing with these
sway sway