Skip to content

Instantly share code, notes, and snippets.

@zamfofex
Created September 9, 2022 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zamfofex/3952105b95d1ce2b4af87d6ed17dea95 to your computer and use it in GitHub Desktop.
Save zamfofex/3952105b95d1ce2b4af87d6ed17dea95 to your computer and use it in GitHub Desktop.
(use-modules (gnu))
(use-service-modules networking sound virtualization ssh)
(define hurd-vm-os
(operating-system (inherit %hurd-vm-operating-system)
(services
(modify-services (operating-system-user-services %hurd-vm-operating-system)
(guix-service-type config =>
(guix-configuration (inherit config)
(extra-options '("--disable-chroot"))))
(openssh-service-type config =>
(openssh-configuration (inherit config)
(authorized-keys `(("root" ,(local-file "/root/.ssh/id_rsa.pub"))))))))))
(operating-system
(host-name "guix")
(locale "en_US.utf8")
(timezone "...")
(keyboard-layout (keyboard-layout "..."))
(users
(cons*
(user-account
(name "zamfofex")
(group "users")
(supplementary-groups '("wheel" "netdev" "audio" "video" "input" "kvm")))
%base-user-accounts))
(packages (append (list (specification->package "nss-certs")) %base-packages))
(services
(cons*
(service network-manager-service-type)
(service wpa-supplicant-service-type)
(service ntp-service-type
(ntp-configuration
(servers
(list
(ntp-server
(type 'pool)
(address "...")
(options '("iburst")))))))
(service alsa-service-type)
(service hurd-vm-service-type
(hurd-vm-configuration
(os hurd-vm-os)
(memory-size 2048)
(disk-size (expt 2 32))))
(modify-services %base-services
(guix-service-type config =>
(guix-configuration (inherit config)
(authorized-keys (cons (local-file "/etc/childhurd/etc/guix/signing-key.pub") %default-authorized-guix-keys)))))))
(bootloader
(bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))
(keyboard-layout keyboard-layout)))
(swap-devices
(list
(swap-space
(target (uuid "...")))))
(file-systems
(cons*
(file-system
(mount-point "/boot/efi")
(device (uuid "..." 'fat32))
(type "vfat"))
(file-system
(mount-point "/")
(device (uuid "..." 'ext4))
(type "ext4"))
%base-file-systems)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment