2017-05-14 02:44:36 +02:00
|
|
|
;;; This is an operating system configuration template for a "bare-bones" setup,
|
|
|
|
;;; suitable for booting in a virtualized environment, including virtual private
|
|
|
|
;;; servers (VPS).
|
|
|
|
|
|
|
|
(use-modules (gnu))
|
|
|
|
(use-package-modules bootloaders disk nvi)
|
|
|
|
|
|
|
|
(define vm-image-motd (plain-file "motd" "
|
|
|
|
This is the GNU system. Welcome!
|
|
|
|
|
2019-03-13 16:44:02 +01:00
|
|
|
This instance of Guix System is a bare-bones template for virtualized environments.
|
2017-05-14 02:44:36 +02:00
|
|
|
|
|
|
|
You will probably want to do these things first if you booted in a virtual
|
|
|
|
private server (VPS):
|
|
|
|
|
|
|
|
* Set a password for 'root'.
|
|
|
|
* Set up networking.
|
|
|
|
* Expand the root partition to fill the space available by 0) deleting and
|
|
|
|
recreating the partition with fdisk, 1) reloading the partition table with
|
|
|
|
partprobe, and then 2) resizing the filesystem with resize2fs.\n"))
|
|
|
|
|
|
|
|
(operating-system
|
|
|
|
(host-name "gnu")
|
|
|
|
(timezone "Etc/UTC")
|
|
|
|
(locale "en_US.utf8")
|
|
|
|
|
2019-01-21 19:37:59 +01:00
|
|
|
(firmware '())
|
2018-12-11 15:42:56 +01:00
|
|
|
|
2017-05-14 02:44:36 +02:00
|
|
|
;; Assuming /dev/sdX is the target hard disk, and "my-root" is
|
|
|
|
;; the label of the target root file system.
|
2017-09-03 01:19:38 +02:00
|
|
|
(bootloader (bootloader-configuration
|
|
|
|
(bootloader grub-bootloader)
|
|
|
|
(target "/dev/sda")
|
|
|
|
(terminal-outputs '(console))))
|
2017-05-14 02:44:36 +02:00
|
|
|
(file-systems (cons (file-system
|
2018-05-18 13:43:07 +02:00
|
|
|
(device (file-system-label "my-root"))
|
2017-05-14 02:44:36 +02:00
|
|
|
(mount-point "/")
|
|
|
|
(type "ext4"))
|
|
|
|
%base-file-systems))
|
|
|
|
|
|
|
|
;; This is where user accounts are specified. The "root"
|
|
|
|
;; account is implicit, and is initially created with the
|
|
|
|
;; empty password.
|
|
|
|
(users %base-user-accounts)
|
|
|
|
|
|
|
|
;; Globally-installed packages.
|
2019-01-21 19:37:59 +01:00
|
|
|
(packages (append (list nvi fdisk
|
|
|
|
;; mostly so xrefs to its manual work
|
|
|
|
grub
|
|
|
|
;; partprobe
|
|
|
|
parted)
|
|
|
|
%base-packages))
|
2017-05-14 02:44:36 +02:00
|
|
|
|
|
|
|
(services (modify-services %base-services
|
|
|
|
(login-service-type config =>
|
|
|
|
(login-configuration
|
|
|
|
(inherit config)
|
|
|
|
(motd vm-image-motd))))))
|