bare-hurd.tmpl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ;; -*-scheme-*-
  2. ;; This is an operating system configuration template
  3. ;; for a "bare bones" setup, with no X11 display server.
  4. ;; To build a disk image for a virtual machine, do
  5. ;;
  6. ;; ./pre-inst-env guix system image --target=i586-pc-gnu \
  7. ;; gnu/system/examples/bare-hurd.tmpl
  8. ;;
  9. ;; You may run it like so
  10. ;;
  11. ;; guix environment --ad-hoc qemu -- qemu-system-i386 -enable-kvm -m 512M \
  12. ;; -device rtl8139,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
  13. ;; -snapshot -hda <the-image>
  14. ;;
  15. ;; and use it like
  16. ;;
  17. ;; ssh -p 10022 root@localhost
  18. ;; guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
  19. ;;
  20. ;; or even (if you use --image-size=3G)
  21. ;;
  22. ;; guix build hello
  23. (use-modules (gnu) (gnu system hurd) (guix utils))
  24. (use-service-modules ssh)
  25. (use-package-modules ssh)
  26. (define %hurd-os
  27. (operating-system
  28. (inherit %hurd-default-operating-system)
  29. (bootloader (bootloader-configuration
  30. (bootloader grub-minimal-bootloader)
  31. (target "/dev/sdX")))
  32. (file-systems (cons (file-system
  33. (device (file-system-label "my-root"))
  34. (mount-point "/")
  35. (type "ext2"))
  36. %base-file-systems))
  37. (host-name "guixygnu")
  38. (timezone "Europe/Amsterdam")
  39. (users (cons (user-account
  40. (name "guix")
  41. (comment "Anonymous Hurd Hacker")
  42. (group "users")
  43. (supplementary-groups '("wheel")))
  44. %base-user-accounts))
  45. (packages (cons openssh-sans-x %base-packages/hurd))
  46. (services (cons (service openssh-service-type
  47. (openssh-configuration
  48. (openssh openssh-sans-x)
  49. (port-number 2222)
  50. (permit-root-login #t)
  51. (allow-empty-passwords? #t)
  52. (password-authentication? #t)))
  53. %base-services/hurd))))
  54. %hurd-os