aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/examples/vm-image.tmpl
blob: 056b439c5fc758c06e97af3107ab25dacea858b2 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
;;; 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!

This instance of GuixSD is a bare-bones template for virtualized environments.

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")

  ;; Assuming /dev/sdX is the target hard disk, and "my-root" is
  ;; the label of the target root file system.
  (bootloader (grub-configuration (target "/dev/sda")
                                  (terminal-outputs '(console))))
  (file-systems (cons (file-system
                        (device "my-root")
                        (title 'label)
                        (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.
  (packages (cons* nvi fdisk
                   grub   ; mostly so xrefs to its manual work
                   parted ; partprobe
                   %base-packages))

  (services (modify-services %base-services
              (login-service-type config =>
                                  (login-configuration
                                    (inherit config)
                                    (motd vm-image-motd))))))
n>Efraim Flashner 2023-08-06gnu: xfstests: Add inputs....Tobias Geerinckx-Rice 2023-08-06gnu: xfstests: Update package style....Tobias Geerinckx-Rice 2023-08-06gnu: xfstests: Update to 1.1.0-3.8de535c....Tobias Geerinckx-Rice 2023-07-23gnu: rewritefs: Use G-expressions....Tobias Geerinckx-Rice 2023-07-23gnu: rewritefs: Update to 0.0.0-1.3a56de8....Tobias Geerinckx-Rice 2023-07-23gnu: apfs-fuse: Update to 0.0.0-2.66b86bd....Tobias Geerinckx-Rice 2023-07-23gnu: fuse@3: Bind to default FUSE variable....Tobias Geerinckx-Rice 2023-07-23gnu: bindfs: Update to 1.17.4....Tobias Geerinckx-Rice 2023-07-23gnu: curlftpfs: Add patches to fix bugs....Tobias Geerinckx-Rice 2023-07-23gnu: bcachefs-tools: Remove obsolete phase & inputs....Tobias Geerinckx-Rice 2023-07-23gnu: bcachefs-tools: Fix shell script wrappers....Tobias Geerinckx-Rice 2023-07-16gnu: xfstests: Update to 1.1.0-2.87f90a2....Tobias Geerinckx-Rice 2023-07-16gnu: bcachefs-tools: Update to 0.1-17.c8bec83....Tobias Geerinckx-Rice 2023-07-16gnu: bcachefs-tools: Respect input rewriting....Tobias Geerinckx-Rice