-
Notifications
You must be signed in to change notification settings - Fork 1
/
Guix_manifest.scm
188 lines (171 loc) · 4.42 KB
/
Guix_manifest.scm
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
(define-module (Guix_manifest))
(use-modules (guix profiles)
(guix transformations)
(guix packages)
(guix utils)
(gnu packages)
(ice-9 match)
(srfi srfi-1))
(define headless?
(eq? #f (getenv "DISPLAY")))
(define UTenn_machines
(list "lily"
"octopus01"
"penguin2"
"space"
"tux01"
"tux02"
"tux03"))
(define guix-system
(file-exists? "/run/current-system/provenance"))
(define work-machine?
(not (eq? #f (member (gethostname)
(cons "bayfront"
UTenn_machines)))))
(define %GUI-only
(list "adwaita-icon-theme"
"ephoto"
"evisum"
"font-culmus"
"font-dejavu"
"font-ghostscript"
"font-gnu-freefont"
"font-gnu-unifont"
"font-opendyslexic"
"font-terminus"
"flatpak"
"gst-plugins-good"
"gst-plugins-ugly"
"icecat"
"kdeconnect"
"keepassxc"
"lagrange"
"libnotify" ; notify-send
"libreoffice"
"mpv"
"mpv-mpris"
"mupdf"
"my-moreutils"
"netsurf"
"nheko"
"pavucontrol"
"pinentry-efl"
"qtwayland"
"quasselclient"
"qutebrowser"
"terminology"
"viewnior"
"wl-clipboard-x11"
"zathura"
"zathura-pdf-poppler"))
(define %work-applications
(list ;"diffoscope"
"mercurial"
"strace"))
(define %not-for-work
(list "btrfs-progs"
"catimg"
"ffmpeg"
"git-annex"
"isync"
"keybase"
"khal"
"khard"
"libhdate"
"msmtp"
"mutt"
"newsboat"
"parcimonie"
"sshfs"
"syncthing"
"toot"
"vdirsyncer"
"weechat"
"yt-dlp"))
(define %headless
(list "pinentry-tty"))
(define %guix-system-apps
;; These packages are provided by Guix System.
(list "guile"
"guile-colorized"
"guile-readline"
"mcron"
"shepherd"))
(define %cli-apps
(list "aria2"
"aspell"
"aspell-dict-en"
"aspell-dict-he"
"bidiv"
"bash-completion"
"file"
"git"
"git:send-email"
"glibc-locales"
"global"
"gnupg"
"hunspell-dict-en"
"links"
"myrepos"
"ncdu"
"nmap"
"nss-certs"
"openssh"
"parallel"
"qrencode"
"rsync"
"screen"
"stow"
"tig"
"torsocks"
"translate-shell"
"tree"
"urlscan"
"vifm"
"vim"
"vim-airline"
"vim-dispatch"
"vim-fugitive"
"vim-gnupg"
"vim-guix-vim"
"editorconfig-vim"
"wcalc"
"wget"
"wgetpaste"))
;; https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.html
(define S specification->package)
;(define package-transformations
; (options->transformation
; (if (false-if-exception (S "ssl-ntv"))
; `((with-graft . "openssl=ssl-ntv")
; (with-branch . "vim-guix-vim=master"))
; '((with-branch . "vim-guix-vim=master")))))
;; https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.html#index-input-rewriting
;; Both of these are equivalent to '--with-input'
;; package-input-rewriting => takes an 'identity'
;; package-input-rewriting/spec => takes a name
;(define modified-packages
; (package-input-rewriting/spec
; ;; We leave the conditional here too to prevent searching for (dfsg main sdl).
; `(("sdl2" . ,(if work-machine?
; (const (S "sdl2"))
; (const (@ (dfsg main sdl) sdl2-2.0.14)))))))
(packages->manifest
(map (compose list specification->package+output)
(filter (lambda (pkg)
(member (or (%current-system)
(%current-target-system))
(package-transitive-supported-systems
(specification->package+output pkg))))
(append
(if (or headless?
(not guix-system))
%headless
%GUI-only)
(if work-machine?
%work-applications
%not-for-work)
(if guix-system
'()
%guix-system-apps)
%cli-apps))))