usb-install-media.scm 1.1 KB

1234567891011121314151617181920212223242526272829
  1. ;; With Eshell:
  2. ;; guix system -L .config/guix/system disk-image ~/.config/guix/system/usb-install-media.scm
  3. (define-module (usb-install-media)
  4. #:use-module (default)
  5. #:use-module (gnu))
  6. (use-package-modules bootloaders)
  7. (operating-system
  8. (inherit default-operating-system)
  9. ;; For some reason USB media can only be booted with GRUB set to "bios" mode.
  10. ;; It could have been possible to specialize default-operating-system
  11. ;; depending on (command-line) containing "reconfigure" or "disk-image", but
  12. ;; that's brittle and less explicit to the user.
  13. (bootloader (bootloader-configuration
  14. (bootloader grub-bootloader)
  15. (target "/dev/sda")))
  16. (file-systems (cons* (file-system
  17. (device (file-system-label "guixsd"))
  18. (mount-point "/")
  19. (type "ext4"))
  20. (file-system
  21. (device "none")
  22. (mount-point "/tmp")
  23. (type "tmpfs")
  24. (check? #f))
  25. %base-file-systems)))