summaryrefslogtreecommitdiff
path: root/gnu/system/shadow.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-12-31 11:55:26 +0200
committerEfraim Flashner <efraim@flashner.co.il>2024-01-17 11:11:10 +0200
commit1e8ac2c41bb43338e00179a538cd6f8880a63cdb (patch)
tree85184ba2b05d05d7afc91af763edcdbf063cbadb /gnu/system/shadow.scm
parent3ca02f03048fc1ef5c604d1ac566e0b75ab5a45f (diff)
system: Add default guix-home-config.
* gnu/system/shadow.scm (%deafult-skeleton-home-config): New variable. (default-skeletons): Add it. Change-Id: Ida4cca8b1b3674491a4f18d94bc1b12d426575ba
Diffstat (limited to 'gnu/system/shadow.scm')
-rw-r--r--gnu/system/shadow.scm35
1 files changed, 34 insertions, 1 deletions
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index ca9c65e6d4e..6c8e02953a1 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -70,6 +70,7 @@
70 %default-gdbinit 70 %default-gdbinit
71 %default-nanorc 71 %default-nanorc
72 %default-dotguile 72 %default-dotguile
73 %default-skeleton-home-config
73 default-skeletons 74 default-skeletons
74 skeleton-directory 75 skeleton-directory
75 %base-groups 76 %base-groups
@@ -239,6 +240,37 @@ convenient interactive line editing and input history.\\n\\n\")))
239 (display \"Consider installing the 'guile-colorized' package 240 (display \"Consider installing the 'guile-colorized' package
240for a colorful Guile experience.\\n\\n\"))))\n")) 241for a colorful Guile experience.\\n\\n\"))))\n"))
241 242
243(define %default-skeleton-home-config
244 (plain-file "default-home-config" "\
245;; This is a sample Guix Home configuration which can help setup your
246;; home directory in the same declarative manner as Guix System.
247;; For more information, see the Home Configuration section of the manual.
248(define-module (guix-home-config)
249 #:use-module (gnu home)
250 #:use-module (gnu home services)
251 #:use-module (gnu home services shells)
252 #:use-module (gnu services)
253 #:use-module (gnu system shadow))
254
255(define home-config
256 (home-environment
257 (services
258 (list
259 ;; Uncomment the shell you wish to use for your user:
260 ;(service home-bash-service-type)
261 ;(service home-fish-service-type)
262 ;(service home-zsh-service-type)
263
264 (service home-files-service-type
265 `((\".guile\" ,%default-dotguile)
266 (\".Xdefaults\" ,%default-xdefaults)))
267
268 (service home-xdg-configuration-files-service-type
269 `((\"gdb/gdbinit\" ,%default-gdbinit)
270 (\"nano/nanorc\" ,%default-nanorc)))))))
271
272home-config"))
273
242(define (default-skeletons) 274(define (default-skeletons)
243 "Return the default skeleton files for /etc/skel. These files are copied by 275 "Return the default skeleton files for /etc/skel. These files are copied by
244'useradd' in the home directory of newly created user accounts." 276'useradd' in the home directory of newly created user accounts."
@@ -257,7 +289,8 @@ for a colorful Guile experience.\\n\\n\"))))\n"))
257 (".nanorc" ,%default-nanorc) 289 (".nanorc" ,%default-nanorc)
258 (".Xdefaults" ,xdefaults) 290 (".Xdefaults" ,xdefaults)
259 (".guile" ,%default-dotguile) 291 (".guile" ,%default-dotguile)
260 (".gdbinit" ,gdbinit)))) 292 (".gdbinit" ,gdbinit)
293 ("guix-home-config.scm" ,%default-skeleton-home-config))))
261 294
262(define (skeleton-directory skeletons) 295(define (skeleton-directory skeletons)
263 "Return a directory containing SKELETONS, a list of name/derivation tuples." 296 "Return a directory containing SKELETONS, a list of name/derivation tuples."