[PATCH] system: Move nanorc to XDG_CONFIG_HOME.

DoneSubmitted by Efraim Flashner.
Details
3 participants
  • Efraim Flashner
  • Leo Famulari
  • Marius Bakke
Owner
unassigned
Severity
normal
E
E
Efraim Flashner wrote on 29 Mar 2020 09:22
(address . guix-patches@gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
20200329072238.29850-1-efraim@flashner.co.il
* gnu/system/shadow.scm (default-skeletons): Move .nanorc to
.config/nano/nanorc.
---
gnu/system/shadow.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 46efdfddab..9bee3d1693 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -172,7 +173,7 @@ set auto-load safe-path /gnu/store/*/lib\n")))
       ;; after ~/.zshrc.  To avoid interfering with any customizations a user
       ;; may have made in their ~/.zshrc, put this in .zprofile, not .zlogin.
       (".zprofile" ,zprofile)
-      (".nanorc" ,(plain-file "nanorc" "\
+      (".config/nano/nanorc" ,(plain-file "nanorc" "\
 # Include all the syntax highlighting modules.
 include /run/current-system/profile/share/nano/*.nanorc\n"))
       (".Xdefaults" ,xdefaults)
-- 
2.26.0
M
M
Marius Bakke wrote on 30 Mar 2020 13:55
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87mu7yukdv.fsf@devup.no
Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (3 lines)
> * gnu/system/shadow.scm (default-skeletons): Move .nanorc to
> .config/nano/nanorc.

LGTM.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6B3kwACgkQoqBt8qM6
VPpZMAgAyEMSZovCbBwmAynyGdfZbMuvCfWfDdAQWhvd/8WZsTMx94l2cKlOE7NA
Rs0T+s9WKkWv12Ua5ha0DxJ/IcKUZjkUBTln/MIOrr+Ot17h8X4m0MHxV0l7CV7s
l+e/sKD3JLaqgnhnit9XuT3DSMgiSNVGcu0L4iDllW3ne/Aex+DdY4aG/Or/nNXb
ya9O3uVVJpthYvF1X7jG0VAwMkBpbwex3kj/OTTjNsNhBLbyXAlomfRnJHJsuqaG
GZCvuKpoPtX5ZUjQxxwAOGjk+5s6+X1y5m8FF7PO5Ttq5zF9kHIgSP+OsVsTq2du
sgkwGmblXdawCRszPwtfHWGSBAyTnQ==
=rZQN
-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 30 Mar 2020 22:06
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 40309@debbugs.gnu.org)
20200330200646.GA15123@jasmine.lan
On Sun, Mar 29, 2020 at 10:22:38AM +0300, Efraim Flashner wrote:
Toggle quote (3 lines)
> * gnu/system/shadow.scm (default-skeletons): Move .nanorc to
> .config/nano/nanorc.

Unfortunately it caused reconfiguration to fail so I reverted this
change in commit 49d20d51e9f0b2944b0e13366d042950554ca931

------
building /gnu/store/y1x8asbzw624ywgkpin35p1i4bqnyfy2-skel.drv...
Backtrace:
4 (primitive-load "/gnu/store/2x7d0jsbgf2ndb5fsk0nj07rhsx?")
In ice-9/eval.scm:
619:8 3 (_ #f)
In ice-9/boot-9.scm:
260:13 2 (for-each #<procedure 7ffff6ad8100 at ice-9/eval.scm:3?> ?)
In guix/build/utils.scm:
343:27 1 (_ "/gnu/store/ajrgkj1s9vdcq00drn703f4zj9dvfrsv-nanorc" ?)
In unknown file:
0 (copy-file "/gnu/store/ajrgkj1s9vdcq00drn703f4zj9dvfrs?" ?)

ERROR: In procedure copy-file:
In procedure copy-file: No such file or directory
`/gnu/store/v1grsca743phw41lyf63dzmh9nz5jlpn-bash_profile' -> `.bash_profile'
`/gnu/store/xdsaw0mj6axj427hyi6ysrnsxi21n7d5-bashrc' -> `.bashrc'
`/gnu/store/6i0b236dyar78zc5k5hrj5dv3vr4zb9w-zprofile' -> `.zprofile'
`/gnu/store/ajrgkj1s9vdcq00drn703f4zj9dvfrsv-nanorc' -> `.config/nano/nanorc'
builder for `/gnu/store/y1x8asbzw624ywgkpin35p1i4bqnyfy2-skel.drv' failed with exit code 1
build of /gnu/store/y1x8asbzw624ywgkpin35p1i4bqnyfy2-skel.drv failed
------

E
E
Efraim Flashner wrote on 30 Mar 2020 14:42
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 40309-done@debbugs.gnu.org)
20200330124252.GC5436@E5400
Patch pushed

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl6B6UwACgkQQarn3Mo9
g1HagRAAh5J4kZCMAAij4flGvXF1AlH6VgfOg7G7Br6M8FQcqHVEc/1u85yXae3H
ygsy7NX7j/MDUfwlw5DnAXz5OLZKE46teRGfAdcj0a8hg9vQT0uHjrBRzg90UnsL
99L7ajrSazE+qW3p4wnCWiB+slLsjwPjyjXEVgqadL5SxcHT2mFQ16waoyVGcxei
MJjzm5+aATZecc9QKMUKqXHhm+5Sgene6syCIGMzlO3be0By4mYbQbG0H3ow88qk
VEpURa73dpn4C4q8XKku2GZARxY//9djNPR7RwLfZOOFTmGCiuhe4eRD2nvdbBfG
5TNVECWDxN21UOEKzWBqNh/qiHgvgR7NMvXFDKn7qvy2B/zK9B+uhPAZMc3NWT5K
KFLR3nHVvNY9P6hAZ91YgnCh7ZK2qqKVJXmZRlfDOvDEILSEY4ALua0wL5MWvB9w
C7vioS+OVB2LWVhm2Ho77/JH072Y/dqYjTZ3W/d2vIwMeEnMmNaWdvpNZgMG5bMm
hu6u6148Ml7i/TDtQxUhY1U988MQWAZiONFxMckRM5u4nqnPDQqYIFCI1J5gPbmW
tLv1WIeVV0fGXcooI6ueX1TIQj+h19kMCABh/loPK5dD+txb1IRJApdWJ3fHQa0e
69JjOHa6BUxMjmfBAdnj9+qZGEgvH8TdrfKfkFm+E4H2C1gg4Vs=
=7EV+
-----END PGP SIGNATURE-----


Closed
E
E
Efraim Flashner wrote on 31 Mar 2020 20:18
[PATCH v2] system: Move nanorc to XDG_CONFIG_HOME.
(address . 40309@debbugs.gnu.org)
20200331181836.19521-1-efraim@flashner.co.il
* gnu/system/shadow.scm (skeleton-directory): Move .nanorc to
.config/nano/nanorc.
---

This time I've tested the patch by running './pre-inst-env guix system
build --no-grafts gnu/system/examples/bare-bones.tmpl' as-is and with
(gnu system shadow) edited to remove .nanorc completely from
default-skeletons.

---
gnu/system/shadow.scm | 5 +++++
1 file changed, 5 insertions(+)

Toggle diff (25 lines)
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 46efdfddab..42480e823c 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -215,6 +216,10 @@ for a colorful Guile experience.\\n\\n\"))))\n"))
                                    ((target source)
                                     (copy-recursively source target)))
                                  '#$skeletons)
+                       ;; Make nanorc respect XDG_CONFIG_HOME.
+                       (when (file-exists? ".nanorc")
+                         (mkdir-p ".config/nano")
+                         (rename-file ".nanorc" ".config/nano/nanorc"))
                        #t))))
 
 (define (assert-valid-users/groups users groups)
-- 
2.26.0
L
L
Leo Famulari wrote on 31 Mar 2020 21:00
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 40309@debbugs.gnu.org)
20200331190031.GA15356@jasmine.lan
On Tue, Mar 31, 2020 at 09:18:36PM +0300, Efraim Flashner wrote:
Toggle quote (3 lines)
> * gnu/system/shadow.scm (skeleton-directory): Move .nanorc to
> .config/nano/nanorc.

Works for me, thanks!
E
E
Efraim Flashner wrote on 1 Apr 2020 06:51
(name . Leo Famulari)(address . leo@famulari.name)(address . 40309-done@debbugs.gnu.org)
20200401045128.GL5436@E5400
On Tue, Mar 31, 2020 at 03:00:31PM -0400, Leo Famulari wrote:
Toggle quote (6 lines)
> On Tue, Mar 31, 2020 at 09:18:36PM +0300, Efraim Flashner wrote:
> > * gnu/system/shadow.scm (skeleton-directory): Move .nanorc to
> > .config/nano/nanorc.
>
> Works for me, thanks!

Patch pushed

--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl6EHdAACgkQQarn3Mo9
g1GY/w//cc9C+eDoYKCXB9yq8L+kxmD7dl7gdFpEidoVD1JfIs9Xjdt4ind6iniS
O8YWtmWIT0vpVceIPf2KekXqORYk07FSZcR7XJTagN6VzAou4iKhxgKsTlsERmA9
Bt47Im/eNuYvp0GeA+DgSqz89vpqSt9oQ2BB7J8gEvrD8e5u3eUj9NF1ir+tqGIn
BYNterHR+aLKXyS9EQji9uoa19iuoTHK2NW+vx1lRdwPO/flaV/rQb4DKDLF+mB6
gF+gwpsDEJecStMSwCKvdt75d/ULSrdYUvxjjzky9x38e/TaEZtVxeT954braa/j
z7YLRcpMMGU5EW4eCaMxugHAdXL2SY+9KLDhgblRSdUXkdTkth039Nj7c80puNkX
9bjvSeMQRMCs5DE2siYw1r02TpvRQu9HAl468WA/es9VuML9T/to2stecCQT4e39
6Hy1XW75pJ2MJpFDczJ5WOGUE5r422HDoG1AGiGAdHb6LL5D3ybXABAagkb6pmFW
g24dRPY7epwfg2+2rJReALnZ9gmKQUUlZ8paVWxAlSZe1aU9zweNINtS2Elv4uMR
vddVHj/6ZfzmEwyZwgh3gj2myRFflYPfDSemBMrhxqxse6SunlQxMFewdrW4YW8o
oS3mXBT5lJcHTDV3u58oBXeq0BIQtO38owjK7H9FYq0cvoleIjA=
=ZgB7
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 40309@debbugs.gnu.org