From 1f1c107cd2469048a6f407fbe442a32f4f98e2bf Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 15 Jul 2017 15:08:25 +0200 Subject: Emacs: Show numerical nix generation even for system profiles --- emacs/.emacs.d/init.org | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'emacs') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index ebdeba3f..7af73220 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -301,9 +301,11 @@ correct, at least for Liberation Mono. (cadr (split-string (f-base (car - (last (split-string - (s-chomp (shell-command-to-string (concat "nix-store -q --roots " invocation-directory))) - "\n")))) + (last (seq-take-while + (lambda (s) (s-contains? "profile" s)) + (split-string + (s-chomp (shell-command-to-string (concat "nix-store -q --roots " invocation-directory))) + "\n"))))) "-")) " " (s-left 6 (nth 3 (f-split invocation-directory))) @@ -311,7 +313,7 @@ correct, at least for Liberation Mono. (s-right 6 (car (split-string (nth 3 (f-split invocation-directory)) "-"))) ")")) '(buffer-file-name " — %f") - '(dired-directory (" — " dired-directory)))) + '(dired-directory (" — " dired-directory)))) #+END_SRC ** Chrome -- cgit 1.4.1