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 →
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Dernière révision Les deux révisions suivantes | ||
utilisateurs:gonzoleri:config:accueil [02/08/2019 23:39] gonzoleri [/etc/config.scm] |
utilisateurs:gonzoleri:config:accueil [30/03/2023 13:43] gonzoleri [Utilisation] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== Fichier de configuration de GuixSD ====== | + | ====== Fichier de configuration de Guix System ====== |
* Objet : Sauvegarde de la configuration de GuixSD | * Objet : Sauvegarde de la configuration de GuixSD | ||
Ligne 13: | Ligne 13: | ||
<file scheme /etc/config.scm> | <file scheme /etc/config.scm> | ||
- | ;; Operating system configuration for a full | + | ;; Ceci était initialement une configuration de système d'exploitation |
- | ;; "desktop" environment with gnome | + | ;; générée par l'installateur graphique. |
- | (use-modules (gnu) (guix) (gnu services mcron) (gnu system nss)) | + | (use-modules (gnu) (gnu services base) (gnu services desktop) (gnu services vpn) |
- | (use-service-modules desktop networking ssh) | + | (gnu packages gnome)(gnu packages certs)(gnu packages screen)(gnu packages ssh) |
- | (use-package-modules bootloaders certs gnome screen ssh base idutils) | + | (gnu packages linux) (gnu packages audio)) |
- | + | (use-service-modules desktop networking ssh xorg virtualization audio dbus sound) | |
- | (define updatedb-job | + | (use-package-modules glib scanner audio linux) |
- | ;; ;; 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 | (operating-system | ||
Ligne 46: | Ligne 26: | ||
(timezone "Europe/Paris") | (timezone "Europe/Paris") | ||
(locale "fr_FR.utf8") | (locale "fr_FR.utf8") | ||
- | |||
- | (keyboard-layout (keyboard-layout "us" "altgr-intl")) | ||
| | ||
- | ;; Assuming /dev/sda is the target hard disk, and "my-root" is | + | (keyboard-layout (keyboard-layout "fr")) |
- | ;; the label of the target root file system, and /dev/sda6 the | + | |
- | ;; target partition for the GuixSD installation. | + | (users (cons* (user-account |
- | (bootloader (grub-configuration (target "/dev/sda") (menu-entries | + | (name "hubert") |
- | (list | + | (comment "Hubert") |
- | (menu-entry | + | (group "users") |
- | (label "Debian GNU/Linux") | + | (home-directory "/home/hubert") |
- | (linux "/boot/vmlinuz-4.19.0-1-amd64") | + | (supplementary-groups |
- | (linux-arguments '("root=/dev/sda1")) | + | '("wheel" "netdev" "audio" "video" "kvm" "lp"))) |
- | (initrd "/boot/initrd.img-4.19.0-1-amd64")))))) | + | %base-user-accounts)) |
- | + | ||
- | (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 | ;; This is where we specify | ||
Ligne 83: | Ligne 44: | ||
screen | screen | ||
openssh | openssh | ||
+ | ;; bluez | ||
+ | ;; bluez-alsa | ||
%base-packages)) | %base-packages)) | ||
- | ;; Add GNOME and/or Xfce---we can choose at the log-in | + | (services |
- | ;; screen with F1. | + | (append |
- | (services (cons* (service gnome-desktop-service-type) | + | (list (service gnome-desktop-service-type) |
- | %desktop-services)) | + | (service xfce-desktop-service-type) |
- | + | (service bluetooth-service-type | |
- | ;; Allow resolution of '.local' host names with mDNS. | + | (bluetooth-configuration |
- | (name-service-switch %mdns-host-lookup-nss)) | + | (auto-enable? #t))) |
- | + | (set-xorg-configuration | |
- | + | (xorg-configuration | |
- | | + | (keyboard-layout keyboard-layout)))) |
+ | ;; (service hurd-vm-service-type | ||
+ | ;; (hurd-vm-configuration | ||
+ | ;; (disk-size (* 12 (expt 2 30))) ;12GiB | ||
+ | ;; (memory-size 1024))) ; 1GiB | ||
+ | %desktop-services)) | ||
+ | (bootloader | ||
+ | (bootloader-configuration | ||
+ | (bootloader grub-bootloader) | ||
+ | (targets "/dev/sda") | ||
+ | (keyboard-layout keyboard-layout))) | ||
+ | (swap-devices | ||
+ | (list (uuid "cf5ad08e-1a92-4a2e-a059-b2a71f4da6ea"))) | ||
+ | (file-systems | ||
+ | (cons* (file-system | ||
+ | (mount-point "/") | ||
+ | (device | ||
+ | (uuid "eabe9803-3544-4e44-b44f-965aa76e7b96" | ||
+ | 'ext4)) | ||
+ | (type "ext4")) | ||
+ | %base-file-systems)) | ||
+ | ) | ||
</file> | </file> | ||
===== Utilisation ===== | ===== 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. | + | Ce fichier peut être utilisé pour restaurer un système (dans quelle mesure, je ne sais pas trop). |