gnucode.me-initial-config.scm 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ;; this was the original file that I used to create my remote linode
  2. (add-to-load-path (dirname (current-filename)))
  3. (use-modules (gnu)
  4. (guix modules)
  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 "locke-lamora")
  15. (timezone "America/Chicago")
  16. (locale "en_US.UTF-8")
  17. ;; This goofy code will generate the grub.cfg
  18. ;; without installing the grub bootloader on disk.
  19. (bootloader (bootloader-configuration
  20. (bootloader
  21. (bootloader
  22. (inherit grub-bootloader)
  23. (installer #~(const #t))))))
  24. (file-systems (cons (file-system
  25. (device "/dev/sda")
  26. (mount-point "/")
  27. (type "ext4"))
  28. %base-file-systems))
  29. (swap-devices (list
  30. (swap-space (target "/dev/sdb"))))
  31. (initrd-modules (cons "virtio_scsi" ; Needed to find the disk
  32. %base-initrd-modules))
  33. (users (cons (user-account
  34. (name "joshua")
  35. (group "users")
  36. ;; Adding the account to the "wheel" group
  37. ;; makes it a sudoer.
  38. (supplementary-groups '("wheel"))
  39. (home-directory "/home/joshua"))
  40. %base-user-accounts))
  41. (sudoers-file
  42. (plain-file "sudoers"
  43. (string-append (plain-file-content %sudoers-specification)
  44. (format #f "~a ALL = NOPASSWD: ALL~%"
  45. "joshua"))))
  46. (packages (cons* nss-certs ;for HTTPS access
  47. openssh-sans-x
  48. %base-packages))
  49. (services (cons*
  50. (service dhcp-client-service-type)
  51. (service openssh-service-type
  52. (openssh-configuration
  53. (openssh openssh-sans-x)
  54. (password-authentication? #f)
  55. (authorized-keys
  56. `(("joshua" ,(plain-file "id_rsa.pub" %joshua-ssh-key))
  57. ("root" ,(plain-file "id_rsa.pub" %joshua-ssh-key))))))
  58. %base-services)))