;; This vm image is meant to be used as an image template ;; to be deployed on cloud providers that use cloud-init. (use-modules (gnu) (guix) (guix gexp) (srfi srfi-1)) (use-service-modules cloud-init base networking ssh) (use-package-modules admin bootloaders package-management python-web ssh) (operating-system (host-name "gnu") (timezone "Etc/UTC") (locale "en_US.utf8") (keyboard-layout (keyboard-layout "us")) (firmware '()) ;; Below we assume /dev/vda is the VM's hard disk. ;; Adjust as needed. (bootloader (bootloader-configuration (bootloader grub-bootloader) (targets '("/dev/vda")) (terminal-outputs '(console)))) (file-systems (cons (file-system (mount-point "/") (device "/dev/vda1") (type "ext4")) %base-file-systems)) ;; The cloud-utils packages provides some utilities to allow ;; us to piggyback off ubuntu's cloud-init modules/integrations ;; without having to write guix specific functionality. ;; ;; The python-cloud-init package is not strictly required to be ;; in system-wide packages. (packages (append (list cloud-utils python-cloud-init) %base-packages)) (services (append (list (service cloud-init-service-type) ;; An example of extra configuration files. This specific ;; file is required for properly running cloud-init on DigitalOcean ;; (cloud-init-configuration (extra-configuration-files ` ;; (("99-digitalocean.cfg" , ;; (plain-file ;; "99-digitalocean.cfg" ;; "datasource_list: [ ConfigDrive, DigitalOcean, NoCloud, None ]")))))) (service network-manager-service-type) (service wpa-supplicant-service-type) (service openssh-service-type (openssh-configuration (openssh openssh-sans-x) (permit-root-login #t)))) %base-services ;; Uncomment the following and replace the above to automatically add your guix ;; signing key to the vm for easy reconfiguration. ;; (modify-services %base-services ;; (guix-service-type config => ;; (guix-configuration (inherit config) ;; (authorized-keys (append ;; (list (local-file ;; "/etc/guix/signing-key.pub")) ;; %default-authorized-guix-keys))))))) )))