endlessh-vm.scm 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. (add-to-load-path "/home/joshua/prog/gnu/guix/guix-config/linode-guix-system-configuration/")
  2. (use-modules (gnu)
  3. (guix modules)
  4. (endlessh-service)
  5. (public-keys))
  6. (use-service-modules networking
  7. ssh)
  8. (use-package-modules admin
  9. certs
  10. package-management
  11. ssh
  12. tls)
  13. (operating-system
  14. (host-name "aquinas")
  15. (timezone "America/Indiana/Indianapolis")
  16. (locale "en_US.UTF-8")
  17. ;; This goofy code will generate the grub.cfg
  18. ;; without installing the grub bootloader on disk.
  19. ;;
  20. (keyboard-layout (keyboard-layout "us" "dvorak"
  21. #:model "thinkpad"
  22. #:options '("ctrl:swapcaps")))
  23. (bootloader (bootloader-configuration
  24. (bootloader grub-bootloader)
  25. (targets (list "/dev/sda"))))
  26. (file-systems (cons (file-system
  27. (device "/dev/sda")
  28. (mount-point "/")
  29. (type "ext4"))
  30. %base-file-systems))
  31. (swap-devices (list (swap-space
  32. (target "/dev/sdb"))))
  33. (initrd-modules %base-initrd-modules)
  34. (users (cons (user-account
  35. (name "joshua")
  36. (group "users")
  37. ;; Adding the account to the "wheel" group
  38. ;; makes it a sudoer.
  39. (supplementary-groups '("wheel"))
  40. (home-directory "/home/joshua"))
  41. %base-user-accounts))
  42. (packages (cons* nss-certs ;for HTTPS access
  43. openssh-sans-x
  44. %base-packages))
  45. (services (cons*
  46. (service dhcp-client-service-type)
  47. (service endlessh-service-type)
  48. (service openssh-service-type
  49. (openssh-configuration
  50. (openssh openssh-sans-x)
  51. (port-number 63355)
  52. (password-authentication? #false)
  53. (authorized-keys
  54. `(("joshua" ,(plain-file "id_rsa.pub" %joshua-ssh-key))))))
  55. %base-services)))