desktop-bababa.scm 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ;; With Eshell:
  2. ;; *sudo -E guix system -L ~/.config/guix/system reconfigure ~/.config/guix/system/desktop-bababa.scm
  3. (define-module (desktop-bababa)
  4. #:use-module (srfi srfi-1)
  5. #:use-module (default)
  6. #:use-module (nongnu packages linux)
  7. #:use-module (guix packages)
  8. #:use-module (gnu)
  9. #:use-module (gnu system)
  10. #:use-module (gnu services))
  11. (use-service-modules
  12. avahi ; To remove avahi.
  13. desktop ; To remove bluetooth.
  14. networking ; To remove NetworkManager.
  15. ;; To remove GDM:
  16. xorg)
  17. (use-package-modules
  18. linux
  19. ;; Stumpwm:
  20. wm)
  21. (define linux-fafafa ; TODO: Kernel panic: VFS error: cannot mount rootfs
  22. (package
  23. (inherit linux)
  24. (name "linux-fafafa")
  25. ;; To build a custom kernel, pass it an alternate "kconfig":
  26. (native-inputs
  27. `(("kconfig" ,(local-file "./kernel-fafafa.conf"))
  28. ,@(alist-delete "kconfig" (package-native-inputs linux))))))
  29. (define-public %bababa/services
  30. (cons*
  31. (service connman-service-type)
  32. (service slim-service-type (slim-configuration
  33. (display ":0")
  34. (vt "vt7")))
  35. ;; TODO: Extra service results in black screen and CPU hog.
  36. ;; (service slim-service-type (slim-configuration
  37. ;; (display ":1")
  38. ;; (vt "vt8")))
  39. (remove
  40. (lambda (service)
  41. (or
  42. (member (service-kind service)
  43. (list avahi-service-type
  44. bluetooth-service
  45. cups-pk-helper-service-type
  46. geoclue-service
  47. gdm-service-type
  48. ;; NetworkManager. The applet is a
  49. ;; simple-service and must be removed by
  50. ;; matching the type name.
  51. network-manager-service-type
  52. ;; wpa-supplicant-service-type ; Still needed for networking.
  53. modem-manager-service-type
  54. usb-modeswitch-service-type))
  55. (member (service-type-name (service-kind service))
  56. '(network-manager-applet))))
  57. %ambrevar/services)))
  58. (define-public %bababa/os
  59. (operating-system
  60. (inherit %ambrevar/default-os)
  61. (host-name "bababa")
  62. (bootloader (bootloader-configuration
  63. (bootloader grub-bootloader)
  64. (timeout 1)
  65. (target "/dev/sdb")))
  66. (kernel linux)
  67. (firmware (append (list amdgpu-firmware)
  68. %ambrevar/firmware))
  69. ;; (initrd-modules (fold (lambda (module l) (delete module l))
  70. ;; (operating-system-initrd-modules %ambrevar/default-os)
  71. ;; '("dm-crypt" "xts" "serpent_generic" "wp512" ;for encrypted root partitions
  72. ;; "hid-apple"
  73. ;; "isci" ;for SAS controllers like Intel C602
  74. ;; ;; Modules for Linux para-virtualized devices, for use in QEMU guests.
  75. ;; ;; "virtio_pci" "virtio_balloon" "virtio_blk" "virtio_net"
  76. ;; ;; "virtio_console"
  77. ;; "virtio-rng" ; TODO: Why can't it be found? Probably not needed.
  78. ;; )))
  79. (file-systems (cons* (file-system
  80. (device (file-system-label "guix"))
  81. (mount-point "/")
  82. (type "btrfs")
  83. (options "subvol=rootfs,compress=zstd"))
  84. (file-system
  85. (device (file-system-label "babadata"))
  86. (mount-point "/media/babadata")
  87. (type "btrfs")
  88. (create-mount-point? #t))
  89. (file-system
  90. (mount-point "/tmp")
  91. (device "none")
  92. (type "tmpfs")
  93. (check? #f))
  94. %base-file-systems))
  95. (packages (cons* stumpwm
  96. (delete iw (operating-system-packages %ambrevar/default-os))))
  97. (services %bababa/services)))
  98. %bababa/os