unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel
@ 2023-12-31 11:34 Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 1/9] system: Export default bash-profile Efraim Flashner
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Efraim Flashner @ 2023-12-31 11:34 UTC (permalink / raw)
  To: 68169; +Cc: Efraim Flashner

A couple of things happening in this patchset:

* Extracting the config files from (default-skeletons) and exposing them
so they can be exported. This allows people to add them directly to
their home configs without re-defining them.

* Syncs .zprofile between (gnu system shadow) and (gnu home services
shell) so there's no surprises about the contents of the config.

Remove duplicate lines which exist in .bashrc/.zprofile and /etc/profile

add an extremely basic guix-home.scm to /etc/skel so it's available as a
starting point if people want to use it.

Efraim Flashner (9):
  system: Export default bash-profile.
  system: Export default zprofile.
  system: Export default xdefaults.
  system: Export default gdbinit.
  system: Export default nanorc.
  system: Export default guile config.
  system: Add default guix-home-config.
  system: default-zprofile: Sync with home zprofile.
  home: services: zsh: Use unified zprofile.

 gnu/home/services/shells.scm |   8 +--
 gnu/system/shadow.scm        | 116 +++++++++++++++++++++++++----------
 2 files changed, 85 insertions(+), 39 deletions(-)


base-commit: 9d148d08be9d77781e8103915b1f498b03fd3dd2
prerequisite-patch-id: ebb16926043f4377669a042730dddd7e9c4d7a39
-- 
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





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#68169] [PATCH 1/9] system: Export default bash-profile.
  2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
@ 2023-12-31 11:39 ` Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 2/9] system: Export default zprofile Efraim Flashner
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2023-12-31 11:39 UTC (permalink / raw)
  To: 68169; +Cc: Efraim Flashner

gnu/system/shadow.scm (%default-bash-profile): Extract from
default-skeletons, export.
(default-skeletons): Use %default-bash-profile.

Change-Id: I45641b1091daee3495a5f92bdc1a63050e0cc59e
---
 gnu/system/shadow.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 47f19551b6..cd4e1a9156 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -64,6 +64,7 @@ (define-module (gnu system shadow)
                user-group-system?)
 
   #:export (%default-bashrc
+            %default-bash-profile
             default-skeletons
             skeleton-directory
             %base-groups
@@ -147,11 +148,8 @@ (define %default-bashrc
 alias grep='grep --color=auto'
 alias ip='ip -color=auto'\n"))
 
-(define (default-skeletons)
-  "Return the default skeleton files for /etc/skel.  These files are copied by
-'useradd' in the home directory of newly created user accounts."
-
-  (let ((profile (plain-file "bash_profile" "\
+(define %default-bash-profile
+  (plain-file "bash_profile" "\
 # Set up Guix Home profile
 if [ -f ~/.profile ]; then . ~/.profile; fi
 
@@ -167,6 +165,12 @@ (define (default-skeletons)
 # Prepend setuid programs.
 export PATH=/run/setuid-programs:$PATH
 "))
+
+(define (default-skeletons)
+  "Return the default skeleton files for /etc/skel.  These files are copied by
+'useradd' in the home directory of newly created user accounts."
+
+  (let ((profile %default-bash-profile)
         (bashrc  %default-bashrc)
         (zprofile    (plain-file "zprofile" "\
 # Honor system-wide environment variables
-- 
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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#68169] [PATCH 2/9] system: Export default zprofile.
  2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 1/9] system: Export default bash-profile Efraim Flashner
@ 2023-12-31 11:39 ` Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 3/9] system: Export default xdefaults Efraim Flashner
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2023-12-31 11:39 UTC (permalink / raw)
  To: 68169; +Cc: Efraim Flashner

* gnu/system/shadow.scm (%default-zprofile): Extract from
default-skeletons, export.
(default-skeletons): Use %default-zprofile.

Change-Id: I6c6e158bca2e462a2eae709fbc2c25a2c7f3f8b4
---
 gnu/system/shadow.scm | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index cd4e1a9156..9b1678c54d 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -65,6 +65,7 @@ (define-module (gnu system shadow)
 
   #:export (%default-bashrc
             %default-bash-profile
+            %default-zprofile
             default-skeletons
             skeleton-directory
             %base-groups
@@ -166,25 +167,28 @@ (define %default-bash-profile
 export PATH=/run/setuid-programs:$PATH
 "))
 
+(define %default-zprofile
+  (plain-file "zprofile" "\
+# Honor system-wide environment variables
+source /etc/profile
+
+# Merge search-paths from multiple profiles, the order matters.
+eval \"$(guix package --search-paths \\
+-p $HOME/.config/guix/current \\
+-p $HOME/.guix-profile \\
+-p /run/current-system/profile)\"
+
+# Prepend setuid programs.
+export PATH=/run/setuid-programs:$PATH
+"))
+
 (define (default-skeletons)
   "Return the default skeleton files for /etc/skel.  These files are copied by
 'useradd' in the home directory of newly created user accounts."
 
-  (let ((profile %default-bash-profile)
-        (bashrc  %default-bashrc)
-        (zprofile    (plain-file "zprofile" "\
-# Honor system-wide environment variables
-source /etc/profile
-
-# Merge search-paths from multiple profiles, the order matters.
-eval \"$(guix package --search-paths \\
--p $HOME/.config/guix/current \\
--p $HOME/.guix-profile \\
--p /run/current-system/profile)\"
-
-# Prepend setuid programs.
-export PATH=/run/setuid-programs:$PATH
-"))
+  (let ((profile   %default-bash-profile)
+        (bashrc    %default-bashrc)
+        (zprofile  %default-zprofile)
         (xdefaults (plain-file "Xdefaults" "\
 XTerm*utf8: always
 XTerm*metaSendsEscape: true\n"))
-- 
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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#68169] [PATCH 3/9] system: Export default xdefaults.
  2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 1/9] system: Export default bash-profile Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 2/9] system: Export default zprofile Efraim Flashner
@ 2023-12-31 11:39 ` Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 4/9] system: Export default gdbinit Efraim Flashner
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2023-12-31 11:39 UTC (permalink / raw)
  To: 68169; +Cc: Efraim Flashner

* gnu/system/shadow.scm (%default-xdefaults): Extract from
default-skeletons, export.
(default-skeletons): Use %default-xdefaults.

Change-Id: I44018516ec3687a68d32ca5c86c41bc29507a273
---
 gnu/system/shadow.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 9b1678c54d..be7c4370a2 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -66,6 +66,7 @@ (define-module (gnu system shadow)
   #:export (%default-bashrc
             %default-bash-profile
             %default-zprofile
+            %default-xdefaults
             default-skeletons
             skeleton-directory
             %base-groups
@@ -182,6 +183,11 @@ (define %default-zprofile
 export PATH=/run/setuid-programs:$PATH
 "))
 
+(define %default-xdefaults
+  (plain-file "Xdefaults" "\
+XTerm*utf8: always
+XTerm*metaSendsEscape: true\n"))
+
 (define (default-skeletons)
   "Return the default skeleton files for /etc/skel.  These files are copied by
 'useradd' in the home directory of newly created user accounts."
@@ -189,9 +195,7 @@ (define (default-skeletons)
   (let ((profile   %default-bash-profile)
         (bashrc    %default-bashrc)
         (zprofile  %default-zprofile)
-        (xdefaults (plain-file "Xdefaults" "\
-XTerm*utf8: always
-XTerm*metaSendsEscape: true\n"))
+        (xdefaults %default-xdefaults)
         (gdbinit   (plain-file "gdbinit" "\
 # Tell GDB where to look for separate debugging files.
 guile
-- 
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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#68169] [PATCH 4/9] system: Export default gdbinit.
  2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
                   ` (2 preceding siblings ...)
  2023-12-31 11:39 ` [bug#68169] [PATCH 3/9] system: Export default xdefaults Efraim Flashner
@ 2023-12-31 11:39 ` Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 5/9] system: Export default nanorc Efraim Flashner
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2023-12-31 11:39 UTC (permalink / raw)
  To: 68169; +Cc: Efraim Flashner

* gnu/system/shadow.scm (%default-gdbinit): Extract from
default-skeletons, export.
(default-skeletons): Use %default-gdbinit.

Change-Id: Ia5188f8083a83ad4cdb96e234dbd730b1bfe0072
---
 gnu/system/shadow.scm | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index be7c4370a2..e1dd31262a 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -67,6 +67,7 @@ (define-module (gnu system shadow)
             %default-bash-profile
             %default-zprofile
             %default-xdefaults
+            %default-gdbinit
             default-skeletons
             skeleton-directory
             %base-groups
@@ -188,16 +189,9 @@ (define %default-xdefaults
 XTerm*utf8: always
 XTerm*metaSendsEscape: true\n"))
 
-(define (default-skeletons)
-  "Return the default skeleton files for /etc/skel.  These files are copied by
-'useradd' in the home directory of newly created user accounts."
-
-  (let ((profile   %default-bash-profile)
-        (bashrc    %default-bashrc)
-        (zprofile  %default-zprofile)
-        (xdefaults %default-xdefaults)
-        (gdbinit   (plain-file "gdbinit" "\
-# Tell GDB where to look for separate debugging files.
+(define %default-gdbinit
+  (plain-file "gdbinit"
+              "# Tell GDB where to look for separate debugging files.
 guile
 (use-modules (gdb))
 (execute (string-append \"set debug-file-directory \"
@@ -215,7 +209,17 @@ (define (default-skeletons)
 
 # Authorize extensions found in the store, such as the
 # pretty-printers of libstdc++.
-set auto-load safe-path /gnu/store/*/lib\n")))
+set auto-load safe-path /gnu/store/*/lib\n"))
+
+(define (default-skeletons)
+  "Return the default skeleton files for /etc/skel.  These files are copied by
+'useradd' in the home directory of newly created user accounts."
+
+  (let ((profile   %default-bash-profile)
+        (bashrc    %default-bashrc)
+        (zprofile  %default-zprofile)
+        (xdefaults %default-xdefaults)
+        (gdbinit   %default-gdbinit))
     `((".bash_profile" ,profile)
       (".bashrc" ,bashrc)
       ;; Zsh sources ~/.zprofile before ~/.zshrc, and it sources ~/.zlogin
-- 
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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#68169] [PATCH 5/9] system: Export default nanorc.
  2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
                   ` (3 preceding siblings ...)
  2023-12-31 11:39 ` [bug#68169] [PATCH 4/9] system: Export default gdbinit Efraim Flashner
@ 2023-12-31 11:39 ` Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 6/9] system: Export default guile config Efraim Flashner
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2023-12-31 11:39 UTC (permalink / raw)
  To: 68169; +Cc: Efraim Flashner

* gnu/system/shadow.scm (%default-nanorc): Extract from
default-skeletons, export.
(default-skeletons): Use %default-nanorc.

Change-Id: I0d07b13ed4894b1152a08b96d9ef8527dde073ce
---
 gnu/system/shadow.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index e1dd31262a..a8bc2d9567 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -68,6 +68,7 @@ (define-module (gnu system shadow)
             %default-zprofile
             %default-xdefaults
             %default-gdbinit
+            %default-nanorc
             default-skeletons
             skeleton-directory
             %base-groups
@@ -211,6 +212,11 @@ (define %default-gdbinit
 # pretty-printers of libstdc++.
 set auto-load safe-path /gnu/store/*/lib\n"))
 
+(define %default-nanorc
+  (plain-file "nanorc"
+              "# Include all the syntax highlighting modules.
+include /run/current-system/profile/share/nano/*.nanorc\n"))
+
 (define (default-skeletons)
   "Return the default skeleton files for /etc/skel.  These files are copied by
 'useradd' in the home directory of newly created user accounts."
@@ -226,9 +232,7 @@ (define (default-skeletons)
       ;; 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" "\
-# Include all the syntax highlighting modules.
-include /run/current-system/profile/share/nano/*.nanorc\n"))
+      (".nanorc" ,%default-nanorc)
       (".Xdefaults" ,xdefaults)
       (".guile" ,(plain-file "dot-guile"
                              "(cond ((false-if-exception (resolve-interface '(ice-9 readline)))
-- 
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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#68169] [PATCH 6/9] system: Export default guile config.
  2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
                   ` (4 preceding siblings ...)
  2023-12-31 11:39 ` [bug#68169] [PATCH 5/9] system: Export default nanorc Efraim Flashner
@ 2023-12-31 11:39 ` Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 7/9] system: Add default guix-home-config Efraim Flashner
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2023-12-31 11:39 UTC (permalink / raw)
  To: 68169; +Cc: Efraim Flashner

* gnu/system/shadow.scm (%default-dotguile): Extract from
default-skeletons, export.
(default-skeletons): Use %default-dotguile.

Change-Id: Ibe91b3b517ae542bd28070a08e14152f87ed75ec
---
 gnu/system/shadow.scm | 42 +++++++++++++++++++++++-------------------
 1 file changed, 23 insertions(+), 19 deletions(-)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index a8bc2d9567..ca9c65e6d4 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -69,6 +69,7 @@ (define-module (gnu system shadow)
             %default-xdefaults
             %default-gdbinit
             %default-nanorc
+            %default-dotguile
             default-skeletons
             skeleton-directory
             %base-groups
@@ -217,25 +218,9 @@ (define %default-nanorc
               "# Include all the syntax highlighting modules.
 include /run/current-system/profile/share/nano/*.nanorc\n"))
 
-(define (default-skeletons)
-  "Return the default skeleton files for /etc/skel.  These files are copied by
-'useradd' in the home directory of newly created user accounts."
-
-  (let ((profile   %default-bash-profile)
-        (bashrc    %default-bashrc)
-        (zprofile  %default-zprofile)
-        (xdefaults %default-xdefaults)
-        (gdbinit   %default-gdbinit))
-    `((".bash_profile" ,profile)
-      (".bashrc" ,bashrc)
-      ;; Zsh sources ~/.zprofile before ~/.zshrc, and it sources ~/.zlogin
-      ;; 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" ,%default-nanorc)
-      (".Xdefaults" ,xdefaults)
-      (".guile" ,(plain-file "dot-guile"
-                             "(cond ((false-if-exception (resolve-interface '(ice-9 readline)))
+(define %default-dotguile
+  (plain-file "dot-guile"
+              "(cond ((false-if-exception (resolve-interface '(ice-9 readline)))
        =>
        (lambda (module)
          ;; Enable completion and input history at the REPL.
@@ -253,6 +238,25 @@ (define (default-skeletons)
               (else
                (display \"Consider installing the 'guile-colorized' package
 for a colorful Guile experience.\\n\\n\"))))\n"))
+
+(define (default-skeletons)
+  "Return the default skeleton files for /etc/skel.  These files are copied by
+'useradd' in the home directory of newly created user accounts."
+
+  (let ((profile   %default-bash-profile)
+        (bashrc    %default-bashrc)
+        (zprofile  %default-zprofile)
+        (xdefaults %default-xdefaults)
+        (gdbinit   %default-gdbinit))
+    `((".bash_profile" ,profile)
+      (".bashrc" ,bashrc)
+      ;; Zsh sources ~/.zprofile before ~/.zshrc, and it sources ~/.zlogin
+      ;; 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" ,%default-nanorc)
+      (".Xdefaults" ,xdefaults)
+      (".guile" ,%default-dotguile)
       (".gdbinit" ,gdbinit))))
 
 (define (skeleton-directory skeletons)
-- 
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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#68169] [PATCH 7/9] system: Add default guix-home-config.
  2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
                   ` (5 preceding siblings ...)
  2023-12-31 11:39 ` [bug#68169] [PATCH 6/9] system: Export default guile config Efraim Flashner
@ 2023-12-31 11:39 ` Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 8/9] system: default-zprofile: Sync with home zprofile Efraim Flashner
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2023-12-31 11:39 UTC (permalink / raw)
  To: 68169; +Cc: Efraim Flashner

* gnu/system/shadow.scm (%deafult-skeleton-home-config): New variable.
(default-skeletons): Add it.

Change-Id: Ida4cca8b1b3674491a4f18d94bc1b12d426575ba
---
 gnu/system/shadow.scm | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index ca9c65e6d4..6c8e02953a 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -70,6 +70,7 @@ (define-module (gnu system shadow)
             %default-gdbinit
             %default-nanorc
             %default-dotguile
+            %default-skeleton-home-config
             default-skeletons
             skeleton-directory
             %base-groups
@@ -239,6 +240,37 @@ (define %default-dotguile
                (display \"Consider installing the 'guile-colorized' package
 for a colorful Guile experience.\\n\\n\"))))\n"))
 
+(define %default-skeleton-home-config
+  (plain-file "default-home-config" "\
+;; This is a sample Guix Home configuration which can help setup your
+;; home directory in the same declarative manner as Guix System.
+;; For more information, see the Home Configuration section of the manual.
+(define-module (guix-home-config)
+  #:use-module (gnu home)
+  #:use-module (gnu home services)
+  #:use-module (gnu home services shells)
+  #:use-module (gnu services)
+  #:use-module (gnu system shadow))
+
+(define home-config
+  (home-environment
+    (services
+      (list
+        ;; Uncomment the shell you wish to use for your user:
+        ;(service home-bash-service-type)
+        ;(service home-fish-service-type)
+        ;(service home-zsh-service-type)
+
+        (service home-files-service-type
+         `((\".guile\" ,%default-dotguile)
+           (\".Xdefaults\" ,%default-xdefaults)))
+
+        (service home-xdg-configuration-files-service-type
+         `((\"gdb/gdbinit\" ,%default-gdbinit)
+           (\"nano/nanorc\" ,%default-nanorc)))))))
+
+home-config"))
+
 (define (default-skeletons)
   "Return the default skeleton files for /etc/skel.  These files are copied by
 'useradd' in the home directory of newly created user accounts."
@@ -257,7 +289,8 @@ (define (default-skeletons)
       (".nanorc" ,%default-nanorc)
       (".Xdefaults" ,xdefaults)
       (".guile" ,%default-dotguile)
-      (".gdbinit" ,gdbinit))))
+      (".gdbinit" ,gdbinit)
+      ("guix-home-config.scm" ,%default-skeleton-home-config))))
 
 (define (skeleton-directory skeletons)
   "Return a directory containing SKELETONS, a list of name/derivation tuples."
-- 
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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#68169] [PATCH 8/9] system: default-zprofile: Sync with home zprofile.
  2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
                   ` (6 preceding siblings ...)
  2023-12-31 11:39 ` [bug#68169] [PATCH 7/9] system: Add default guix-home-config Efraim Flashner
@ 2023-12-31 11:39 ` Efraim Flashner
  2023-12-31 11:39 ` [bug#68169] [PATCH 9/9] home: services: zsh: Use unified zprofile Efraim Flashner
  2024-01-17  9:19 ` bug#68169: [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
  9 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2023-12-31 11:39 UTC (permalink / raw)
  To: 68169; +Cc: Efraim Flashner

The removed fields are already sourced in /etc/profile.

* gnu/system/shadow.scm (%default-zprofile): Sync with default zprofile
from (gnu home services shells).

Change-Id: I419eadf636344e23e8fd2f7006efa81f45527756
---
 gnu/system/shadow.scm | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 6c8e02953a..8b3958ba5c 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -174,17 +174,10 @@ (define %default-bash-profile
 
 (define %default-zprofile
   (plain-file "zprofile" "\
-# Honor system-wide environment variables
+# Set up the system, user profile, and related variables.
 source /etc/profile
-
-# Merge search-paths from multiple profiles, the order matters.
-eval \"$(guix package --search-paths \\
--p $HOME/.config/guix/current \\
--p $HOME/.guix-profile \\
--p /run/current-system/profile)\"
-
-# Prepend setuid programs.
-export PATH=/run/setuid-programs:$PATH
+# Set up the home environment profile.
+source ~/.profile
 "))
 
 (define %default-xdefaults
-- 
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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#68169] [PATCH 9/9] home: services: zsh: Use unified zprofile.
  2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
                   ` (7 preceding siblings ...)
  2023-12-31 11:39 ` [bug#68169] [PATCH 8/9] system: default-zprofile: Sync with home zprofile Efraim Flashner
@ 2023-12-31 11:39 ` Efraim Flashner
  2024-01-17  9:19 ` bug#68169: [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
  9 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2023-12-31 11:39 UTC (permalink / raw)
  To: 68169; +Cc: Efraim Flashner

* gnu/home/services/shells.scm (zsh-file-zprofile): Use the zprofile
defined in (gnu system shadow) as a base.

Change-Id: Iaf4c4f66d1ccbc0bd0166136b3d082229bdec201
---
 gnu/home/services/shells.scm | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index 9dd56f634a..db82a7cff3 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -20,7 +20,7 @@
 
 (define-module (gnu home services shells)
   #:use-module (gnu services configuration)
-  #:autoload   (gnu system shadow) (%default-bashrc)
+  #:autoload   (gnu system shadow) (%default-bashrc %default-zprofile)
   #:use-module (gnu home services utils)
   #:use-module (gnu home services)
   #:use-module (gnu packages shells)
@@ -189,12 +189,8 @@ (define (zsh-file-zshenv config)
 (define (zsh-file-zprofile config)
   (mixed-text-file
    "zprofile"
+   (plain-file-content %default-zprofile)
    "\
-# Set up the system, user profile, and related variables.
-source /etc/profile
-# Set up the home environment profile.
-source ~/.profile
-
 # It's only necessary if zsh is a login shell, otherwise profiles will
 # be already sourced by bash
 "
-- 
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





^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#68169: [PATCH 0/9] Add guix-home config to /etc/skel
  2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
                   ` (8 preceding siblings ...)
  2023-12-31 11:39 ` [bug#68169] [PATCH 9/9] home: services: zsh: Use unified zprofile Efraim Flashner
@ 2024-01-17  9:19 ` Efraim Flashner
  9 siblings, 0 replies; 11+ messages in thread
From: Efraim Flashner @ 2024-01-17  9:19 UTC (permalink / raw)
  To: 68169-done

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

Patches 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-01-17  9:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-31 11:34 [bug#68169] [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner
2023-12-31 11:39 ` [bug#68169] [PATCH 1/9] system: Export default bash-profile Efraim Flashner
2023-12-31 11:39 ` [bug#68169] [PATCH 2/9] system: Export default zprofile Efraim Flashner
2023-12-31 11:39 ` [bug#68169] [PATCH 3/9] system: Export default xdefaults Efraim Flashner
2023-12-31 11:39 ` [bug#68169] [PATCH 4/9] system: Export default gdbinit Efraim Flashner
2023-12-31 11:39 ` [bug#68169] [PATCH 5/9] system: Export default nanorc Efraim Flashner
2023-12-31 11:39 ` [bug#68169] [PATCH 6/9] system: Export default guile config Efraim Flashner
2023-12-31 11:39 ` [bug#68169] [PATCH 7/9] system: Add default guix-home-config Efraim Flashner
2023-12-31 11:39 ` [bug#68169] [PATCH 8/9] system: default-zprofile: Sync with home zprofile Efraim Flashner
2023-12-31 11:39 ` [bug#68169] [PATCH 9/9] home: services: zsh: Use unified zprofile Efraim Flashner
2024-01-17  9:19 ` bug#68169: [PATCH 0/9] Add guix-home config to /etc/skel Efraim Flashner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).