guix-machines/.guix/rekahsoft/guix-config/proxmox-vm-legacy.scm
Collin J. Doering 70c381aec5
rekahsoft: Abstract legacy vm's (starting with searx0)
* .guix/rekahsoft/guix-config/proxmox-vm-legacy.scm (rekahsoft): New module that abstracts legacy vm's (postgres, searx0, my0, dash0, prom0). The exports of this module mimic the existing proxmox-vm-lvm-minimal module.

* .guix/rekahsoft/guix-config/vms/searx0-home-rekahsoft-ca.scm (rekahsoft): Refactor to use newly added proxmox-vm-legacy module
2022-07-04 00:15:04 -04:00

29 lines
906 B
Scheme

(define-module (rekahsoft guix-config proxmox-vm-legacy)
#:use-module (gnu)
#:use-module (gnu packages)
#:use-module (rekahsoft guix-config proxmox-vm-lvm-minimal)
#:export (%proxmox-vm-legacy-services
proxmox-vm-legacy))
(define %proxmox-vm-legacy-services %proxmox-vm-lvm-minimal-services)
;; "Legacy" vm's do not use lvm, but are all based on the same image (therefore, same root uuid)
(define (proxmox-vm-legacy host-name)
(let ((base-system (proxmox-vm-lvm-minimal host-name)))
(operating-system
(inherit base-system)
(file-systems
(cons* (file-system
(mount-point "/")
(device
(uuid "f354b908-fd6f-46c9-931b-2bebaac61b56"
'ext4))
(type "ext4"))
%base-file-systems))
(swap-devices
(list (swap-space (target "/dev/sda2"))))
(mapped-devices '()))))