rekahsoft: Continue abstracting legacy vm's (#6 - ci0)

* deploy/ci0-home-rekahsoft-ca.scm (rekahsoft): Adjust configuration to use
proxmox-vm-legacy module

* .guix/rekahsoft/guix-config/vms/ci0-home-rekahsoft-ca.scm (rekahsoft): Add deployment
file for ci0
This commit is contained in:
Collin J. Doering 2023-03-05 06:10:14 -05:00
parent bbfe9423db
commit efc80ff07e
Signed by: rekahsoft
GPG Key ID: 7B4DEB93212B3022
2 changed files with 35 additions and 77 deletions

View File

@ -1,83 +1,27 @@
(define-module (rekahsoft guix-config vms ci0-home-rekahsoft-ca)
#:use-module (gnu)
#:use-module (gnu system nss)
#:use-module (gnu packages)
#:use-module (gnu system)
#:use-module (gnu packages shells)
#:use-module (gnu services desktop)
#:use-module (gnu services networking)
#:use-module (gnu services ssh)
#:use-module (gnu services monitoring)
#:use-module (gnu services docker)
#:use-module (gnu services xorg)
#:use-module (srfi srfi-1)
#:export (system))
#:use-module (rekahsoft guix-config proxmox-vm-legacy)
#:export (%system))
(define system
(define base-system (proxmox-vm-legacy "ci0"))
(define %system
(operating-system
(host-name "ci0")
(timezone "America/Toronto")
(locale "en_US.utf8")
(keyboard-layout (keyboard-layout "us"))
(bootloader
(bootloader-configuration
(bootloader grub-bootloader)
(targets '("/dev/sda"))
(keyboard-layout keyboard-layout)))
(initrd-modules
(append '("virtio_scsi") %base-initrd-modules))
(swap-devices (list "/dev/sda2"))
(file-systems
(cons* (file-system
(mount-point "/")
(device
(uuid "f354b908-fd6f-46c9-931b-2bebaac61b56"
'ext4))
(type "ext4"))
%base-file-systems))
(users (cons (user-account
(name "collin")
(comment "Master User")
(group "users")
(shell #~(string-append #$zsh "/bin/zsh"))
(supplementary-groups
'("wheel" "netdev" "audio" "video" "docker"))
(home-directory "/home/collin"))
%base-user-accounts))
(packages
(append
(map specification->package
'("nss-certs"
"recutils"
"openssh"
"tmux"
"emacs"
"emacs-guix"))
%base-packages))
(services
(append
(list (service openssh-service-type
(openssh-configuration
(password-authentication? #f)
(authorized-keys
`(("collin" ,(local-file "collin.pub"))
("root" ,(local-file "collin.pub"))))))
(service prometheus-node-exporter-service-type)
(service docker-service-type))
(modify-services
(remove (lambda (service)
(eq? (service-kind service) gdm-service-type))
%desktop-services)
(guix-service-type
config => (guix-configuration
(inherit config)
(substitute-urls '("https://nexus.home.rekahsoft.ca/repository/guix")))))))
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss)))
(inherit base-system)
(users (cons*
(user-account
(name "collin")
(comment "Master User")
(group "users")
(shell #~(string-append #$zsh "/bin/zsh"))
(supplementary-groups
'("wheel" "netdev" "audio" "video" "docker"))
(home-directory "/home/collin"))
(operating-system-users base-system)))
(services
(append
(list (service docker-service-type))
%proxmox-vm-legacy-services))))

View File

@ -0,0 +1,14 @@
(use-modules
(rekahsoft guix-config vms ci0-home-rekahsoft-ca))
(list
(machine
(operating-system %system)
(environment managed-host-environment-type)
(configuration (machine-ssh-configuration
(host-name "ci0.home.rekahsoft.ca")
(host-key "TODO")
(system "x86_64-linux")
(user "auto")
(identity ".deploy-key")
(port 22)))))