file-systems: Remove 'title' field and add <file-system-label>.
[jackhill/guix/guix.git] / gnu / system / examples / vm-image.tmpl
1 ;;; This is an operating system configuration template for a "bare-bones" setup,
2 ;;; suitable for booting in a virtualized environment, including virtual private
3 ;;; servers (VPS).
4
5 (use-modules (gnu))
6 (use-package-modules bootloaders disk nvi)
7
8 (define vm-image-motd (plain-file "motd" "
9 This is the GNU system. Welcome!
10
11 This instance of GuixSD is a bare-bones template for virtualized environments.
12
13 You will probably want to do these things first if you booted in a virtual
14 private server (VPS):
15
16 * Set a password for 'root'.
17 * Set up networking.
18 * Expand the root partition to fill the space available by 0) deleting and
19 recreating the partition with fdisk, 1) reloading the partition table with
20 partprobe, and then 2) resizing the filesystem with resize2fs.\n"))
21
22 (operating-system
23 (host-name "gnu")
24 (timezone "Etc/UTC")
25 (locale "en_US.utf8")
26
27 ;; Assuming /dev/sdX is the target hard disk, and "my-root" is
28 ;; the label of the target root file system.
29 (bootloader (bootloader-configuration
30 (bootloader grub-bootloader)
31 (target "/dev/sda")
32 (terminal-outputs '(console))))
33 (file-systems (cons (file-system
34 (device (file-system-label "my-root"))
35 (mount-point "/")
36 (type "ext4"))
37 %base-file-systems))
38
39 ;; This is where user accounts are specified. The "root"
40 ;; account is implicit, and is initially created with the
41 ;; empty password.
42 (users %base-user-accounts)
43
44 ;; Globally-installed packages.
45 (packages (cons* nvi fdisk
46 grub ; mostly so xrefs to its manual work
47 parted ; partprobe
48 %base-packages))
49
50 (services (modify-services %base-services
51 (login-service-type config =>
52 (login-configuration
53 (inherit config)
54 (motd vm-image-motd))))))