yggdrasil.tmpl 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ;; This is an operating system configuration template
  2. ;; for a "bare bones" setup, with no X11 display server.
  3. (use-modules (gnu))
  4. (use-service-modules networking ssh)
  5. (use-package-modules admin curl networking screen)
  6. (operating-system
  7. (host-name "ruby-guard-5545")
  8. (timezone "Europe/Budapest")
  9. (locale "en_US.utf8")
  10. ;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the
  11. ;; target hard disk, and "my-root" is the label of the target
  12. ;; root file system.
  13. (bootloader (bootloader-configuration
  14. (bootloader grub-bootloader)
  15. (target "/dev/sdX")))
  16. (file-systems (cons (file-system
  17. (device (file-system-label "my-root"))
  18. (mount-point "/")
  19. (type "ext4"))
  20. %base-file-systems))
  21. (users (cons (user-account
  22. (name "alice")
  23. (comment "Bob's sister")
  24. (group "users")
  25. ;; adding her to the yggdrasil group means she can use
  26. ;; yggdrasilctl to modify the configuration
  27. (supplementary-groups '("wheel" "yggdrasil")))
  28. %base-user-accounts))
  29. ;; Globally-installed packages.
  30. (packages (cons* screen curl %base-packages))
  31. ;; Add services to the baseline: a DHCP client and
  32. ;; an SSH server.
  33. ;; If you add an /etc/yggdrasil-private.conf, you can log in to ssh
  34. ;; using your Yggdrasil IPv6 address from another machine running Yggdrasil.
  35. ;; Alternatively, the client can sit behind a router that has Yggdrasil.
  36. ;; That file is specifically _not_ handled by Guix, because we don't want its
  37. ;; contents to sit in the world-readable /gnu/store.
  38. (services
  39. (append
  40. (list
  41. (service dhcp-client-service-type)
  42. (service yggdrasil-service-type
  43. (yggdrasil-configuration
  44. (log-to 'stdout)
  45. (log-level 'debug)
  46. (autoconf? #f)
  47. (json-config
  48. ;; choose a few from
  49. ;; https://github.com/yggdrasil-network/public-peers
  50. '((peers . #("tcp://1.2.3.4:1337"))))
  51. (config-file #f)))
  52. (service openssh-service-type
  53. (openssh-configuration
  54. (port-number 2222))))
  55. %base-services)))