diff options
author | Alan Pearce | 2017-07-15 15:08:25 +0200 |
---|---|---|
committer | Alan Pearce | 2017-07-15 15:08:25 +0200 |
commit | 1f1c107cd2469048a6f407fbe442a32f4f98e2bf (patch) | |
tree | acc5de74744064fc63c0cb20a109f2e99432a565 /emacs | |
parent | 4478189a54426c3956f7b2a5243c2bc9828edaf9 (diff) | |
download | nixfiles-1f1c107cd2469048a6f407fbe442a32f4f98e2bf.tar.lz nixfiles-1f1c107cd2469048a6f407fbe442a32f4f98e2bf.tar.zst nixfiles-1f1c107cd2469048a6f407fbe442a32f4f98e2bf.zip |
Emacs: Show numerical nix generation even for system profiles
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/init.org | 10 |
1 files changed, 6 insertions, 4 deletions
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 |