logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).


L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT → ODT PDF Export

Ceci est une ancienne révision du document !


Fichier de configuration de GuixSD

Introduction

Le fichier de configuration d'un ordinateur tournant sous GuixSD peut être sauvegardé et réutilisé en cas de besoin. Son nom est config.scm et le chemin complet est : /etc/config.scm

/etc/config.scm

/etc/config.scm
;; Operating system configuration for a full
;; "desktop" environment with gnome
 
(use-modules (gnu) (guix) (gnu services mcron) (gnu system nss))
(use-service-modules desktop networking ssh)
(use-package-modules bootloaders certs gnome screen ssh base idutils)
 
(define updatedb-job
;;  ;; Run 'updatedb' at 20AM every day.  Here we write the
;;  ;; job's action as a Scheme procedure.
  #~(job '(next-hour '(20))
         (lambda ()
           (execl (string-append #$findutils "/bin/updatedb")
                  "updatedb"
                  "--prunepaths=/tmp /var/tmp /gnu/store"))))
 
(define garbage-collector-job
;;  ;; Collect garbage 5 minutes after 17 o'clock every day.
;;  ;; The job's action is a shell command.
  #~(job "5 17 * * *"            ;Vixie cron syntax
         "guix gc -F 5G"))
 
(define idutils-job
;;  ;; Update the index database as user "hubert" at 12:15PM
;;  ;; and 19:15PM.  This runs from the user's home directory.
  #~(job '(next-minute-from (next-hour '(12 19)) '(15))
         (string-append #$idutils "/bin/mkid src")
         #:user "hubert"))
 
(operating-system
  (host-name "gnu")
  (timezone "Europe/Paris")
  (locale "fr_FR.utf8")
 
(keyboard-layout (keyboard-layout "us" "altgr-intl"))  
 
;; Assuming /dev/sda is the target hard disk, and "my-root" is
;; the label of the target root file system, and /dev/sda6 the
;; target partition for the GuixSD installation.
(bootloader (grub-configuration (target "/dev/sda") (menu-entries
	               (list
			(menu-entry
		        (label "Debian GNU/Linux")
	                (linux "/boot/vmlinuz-4.19.0-1-amd64")
	                (linux-arguments '("root=/dev/sda1"))
	                (initrd "/boot/initrd.img-4.19.0-1-amd64"))))))
 
(file-systems (cons (file-system
                      (device (file-system-label "my-root"))
                      (mount-point "/")
                      (type "ext4"))
	             %base-file-systems))
 
(swap-devices '("/dev/sda5"))
 
(users (cons (user-account
              (name "hubert")
              (comment "GuixSD user")
              (group "users")
              (supplementary-groups '("wheel" "netdev"
                                      "audio" "video"))
              (home-directory "/home/hubert"))
             %base-user-accounts))
 
;; This is where we specify
;; system-wide packages.
(packages (cons* gvfs                 ;for users mounts
                 nss-certs            ;for HTTPS access
                 screen
                 openssh
                %base-packages))
 
;; Add GNOME and/or Xfce---we can choose at the log-in
;; screen with F1.
(services (cons* (service gnome-desktop-service-type)
                %desktop-services))
 
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))                
 
 
 

Utilisation

Ce fichier peut être utilisé pour restaurer un système. Il peut aussi servir d'exemple, en particulier pour une installation de GuixSD en Dual boot avec une autre distribution.

utilisateurs/gonzoleri/config/accueil.1564781967.txt.gz · Dernière modification: 02/08/2019 23:39 par gonzoleri

Pied de page des forums

Propulsé par FluxBB