~abcdw/rde

rde/rde/features/tmux.scm -rw-r--r-- 925 bytes
e98d6a8eAndrew Tropin rde: gnupg: Add copyright preamble. 19 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
(define-module (rde features tmux)
  #:use-module (rde features)
  #:use-module (rde features predicates)
  #:use-module (gnu home-services base)
  #:use-module (gnu services)
  #:use-module (gnu packages tmux)
  #:use-module (guix gexp)

  #:export (feature-tmux))


(define* (feature-tmux
	  #:key
	  config-file
	  (package tmux))
  "Configure tmux."
  (ensure-pred maybe-file-like? config-file)
  (ensure-pred any-package? package)

  (define (tmux-home-services config)
    "Returns home services related to tmux."
    ;; TODO: Implement home service and rewrite to it to make this
    ;; feature extendable.
    (list
     (home-generic-service
      'home-tmux
      #:files
      (filter list?
	      (list (when config-file
		      (list ".config/tmux/tmux.conf" config-file))))
      #:packages (list package))))

  (feature
   (name 'tmux)
   (values `((tmux . #t)))
   (home-services-getter tmux-home-services)))