desktop-fafafa.scm 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. ;; With Eshell:
  2. ;; *sudo -E guix system -L ~/.config/guix/system reconfigure ~/.config/guix/system/desktop-fafafa.scm
  3. ;; WARNING: Until https://issues.guix.info/issue/37305#16 is merged, btrfs
  4. ;; subvolume are not supported by GRUB in Guix.
  5. ;; Temporary workaround is to add the following entry to GRUB after a "guix system reconfigure":
  6. ;;
  7. ;; menuentry "GNU with Linux 5.4.25" {
  8. ;; search --label --set guix
  9. ;; linux /rootfs/gnu/store/cwyag3gnahmibm0rg1f0j8bn3xw9k8fi-linux-5.4.25/bzImage --root=guix --system=/gnu/store/h5fkddrfrii7254d67aslicjy9karvpa-system --load=/gnu/store/h5fkddrfrii7254d67aslicjy9karvpa-system/boot quiet
  10. ;; initrd /rootfs/gnu/store/zlqn6hb9w7yqzsc08kfljijw55jx5j3x-raw-initrd/initrd.cpio.gz
  11. ;; }
  12. ;;
  13. ;; Note that /rootfs ire prefixed to the kernel and initrd paths, but not to the arguments.
  14. (define-module (desktop-fafafa)
  15. #:use-module (nongnu packages linux)
  16. #:use-module (default)
  17. #:use-module (gnu)
  18. #:use-module (gnu system)
  19. #:use-module (gnu services))
  20. (use-service-modules
  21. cups ; Printing
  22. desktop ; GNOME
  23. nix
  24. ssh
  25. virtualization ; libvirt
  26. ;; GDM:
  27. xorg)
  28. (use-package-modules
  29. linux
  30. ;; nix:
  31. package-management)
  32. (define %fafafa/services
  33. (cons*
  34. (service nix-service-type)
  35. (modify-services
  36. %ambrevar/services
  37. (gdm-service-type config =>
  38. (gdm-configuration
  39. (inherit config)
  40. (default-user "francoise")
  41. ;; (auto-login? #t) ; TODO: This breaks GDM, fix it!
  42. )))))
  43. (operating-system
  44. (inherit default-operating-system)
  45. (host-name "fafafa")
  46. (keyboard-layout (keyboard-layout "fr"))
  47. (bootloader (bootloader-configuration
  48. (bootloader grub-bootloader)
  49. (timeout 1)
  50. (target "/dev/sda")))
  51. ;; Needed for r600 Radeon module. With nonfree Linux only, X won't start.
  52. (kernel linux)
  53. (firmware (append (list radeon-firmware)
  54. %ambrevar/firmware))
  55. (file-systems (cons* (file-system
  56. (device (file-system-label "guix"))
  57. (mount-point "/")
  58. (type "btrfs")
  59. (options "subvol=rootfs,compress=zstd"))
  60. (file-system
  61. (device (file-system-label "data"))
  62. (mount-point "/media/data")
  63. (type "ext4"))
  64. (file-system
  65. (mount-point "/tmp")
  66. (device "none")
  67. (type "tmpfs")
  68. (check? #f))
  69. %base-file-systems))
  70. (users (cons* (user-account
  71. (name "francoise")
  72. (group "users")
  73. (supplementary-groups '("netdev" ; netdev is needed for networking.
  74. "kvm" ; For QEMU (and maybe libvirt)
  75. "video"))
  76. (home-directory "/home/francoise"))
  77. (operating-system-users default-operating-system)))
  78. (packages (cons* nix
  79. (operating-system-packages default-operating-system)))
  80. (services (cons*
  81. (set-xorg-configuration
  82. (xorg-configuration
  83. (keyboard-layout keyboard-layout)))
  84. (service gnome-desktop-service-type)
  85. (service libvirt-service-type
  86. (libvirt-configuration
  87. (unix-sock-group "kvm")))
  88. (service openssh-service-type
  89. (openssh-configuration
  90. (x11-forwarding? #t)
  91. (password-authentication? #f)))
  92. (service cups-service-type
  93. (cups-configuration
  94. (web-interface? #t)))
  95. %fafafa/services)))