Ajout du fichier de config

This commit is contained in:
Adrien Bourmault 2023-01-10 13:21:01 +01:00
parent 92b30849ea
commit 14494ab066
1 changed files with 146 additions and 0 deletions

146
config.scm Normal file
View File

@ -0,0 +1,146 @@
;; Ceci est une configuration de système d'exploitation générée par
;; l'installateur graphique.
;;
;; Une fois l'installation terminée, vous pouvez apprendre à modifier
;; ce fichier pour ajuster la configuration du système et le passer à
;; la commande « guix system reconfigure » pour rendre vos changements
;; effectifs.
;; Indique quels modules importer pour accéder aux variables
;; utilisées dans cette configuration.
(use-modules (gnu))
(use-modules (nongnu packages linux) (nongnu system linux-initrd))
(use-service-modules cups desktop networking ssh xorg virtualization vpn)
;; Définitions
(define %sudoers-specification
(plain-file "sudoers" "\
root ALL=(ALL) ALL
%wheel ALL=(ALL) NOPASSWD: ALL
"))
(define %spice-rules
(udev-rule
"50-spice.rules"
(string-append "\
SUBSYSTEM==\"usb\", GROUP=\"spice\", MODE=\"0660\"
SUBSYSTEM==\"usb_device\", GROUP=\"spice\", MODE=\"0660\"
")))
;; Début de la configuration
(operating-system
(locale "fr_FR.utf8")
(timezone "Europe/Paris")
(keyboard-layout (keyboard-layout "fr" "oss"))
(host-name "n-guix-fix")
(kernel linux)
(kernel-arguments
(append
(list "modprobe.blacklist=nouveau,pcspkr" "amd_iommu=on" "iommu=pt" "splash")
%default-kernel-arguments))
(initrd microcode-initrd)
(firmware (list linux-firmware))
(sudoers-file %sudoers-specification)
;; La liste des comptes utilisateurs (« root » est implicite).
(users (cons* (user-account
(name "neox")
(comment "neox")
(group "users")
(home-directory "/home/neox")
(supplementary-groups '("wheel" "netdev" "audio" "video" "libvirt" "kvm" "scanner" "spice")))
%base-user-accounts))
;; Packages installed system-wide. Users can also install packages
;; under their own account: use 'guix search KEYWORD' to search
;; for packages and 'guix install PACKAGE' to install a package.
(packages (append (list (specification->package "nss-certs")
(specification->package "qemu")
(specification->package "virt-manager")
(specification->package "libvirt")
(specification->package "lvm2")
(specification->package "mdadm")
(specification->package "network-manager")
(specification->package "network-manager-openvpn"))
%base-packages))
;; Voici la liste des services du système. Pour trouver les services disponibles,
;; lancez « guix system search MOT-CLÉ » dans un terminal.
(services
(modify-services (append
(list
(service gnome-desktop-service-type)
(service cups-service-type)
(service libvirt-service-type)
(udev-rules-service 'spice %spice-rules #:groups '("spice"))
(service virtlog-service-type)
(set-xorg-configuration
(xorg-configuration (keyboard-layout keyboard-layout))))
%desktop-services)
(network-manager-service-type config => (network-manager-configuration
(inherit config)
(vpn-plugins
(list (specification->package "network-manager-openvpn")))))
(guix-service-type config => (guix-configuration
(inherit config)
(substitute-urls
(append (list "https://substitutes.nonguix.org") %default-substitute-urls))
(authorized-keys
(append (list (local-file "./nonguix-key.pub")) %default-authorized-guix-keys))))))
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))
(keyboard-layout keyboard-layout)))
;; La liste des systèmes de fichiers qui seront « montés ». Les identifiants
;; de systèmes de fichiers uniques (« UUIDs ») qui se trouvent ici s'obtiennent
;; en exécutant « blkid » dans un terminal.
(mapped-devices
(list
(mapped-device
(source (uuid "004c8c71-696f-4aa9-ad87-546a5457c988"))
(target "luks-004c8c71-696f-4aa9-ad87-546a5457c988")
(type luks-device-mapping))
(mapped-device
(source (list "/dev/sda1" "/dev/sdb1"))
(target "/dev/md1")
(type raid-device-mapping))
(mapped-device
(source (list "/dev/sde1" "/dev/sdf1"))
(target "/dev/md0")
(type raid-device-mapping))
(mapped-device
(source (list "/dev/sdc1" "/dev/sdd1"))
(target "/dev/md2")
(type raid-device-mapping))))
(file-systems
(cons*
(file-system
(mount-point "/wiab")
(device (uuid "2a13cf03-fc71-44ac-8e1a-d6744201336f" 'ext4))
(type "ext4"))
(file-system
(mount-point "/")
(device (uuid "2e44f3f7-bb6b-43ac-933a-e8992bf10d29" 'ext4))
(type "ext4"))
(file-system
(mount-point "/home")
(device (uuid "fb90a589-5eff-403f-bb1c-e4e6156c6ca6" 'ext4))
(type "ext4")
(dependencies mapped-devices))
(file-system
(mount-point "/boot/efi")
(device (uuid "DC58-946E" 'fat32))
(type "vfat"))
%base-file-systems)))