system-configuration/homes/sybil.scm

sybil.scm

1
(use-modules
2
  (gnu home)
3
  (gnu services)
4
  (gnu packages)
5
  (gnu home services)
6
  (gnu home services openbox)
7
  (gnu home services shells)
8
9
  ;; for openbox
10
  (gnu packages compton)
11
  (gnu packages dunst)
12
  (gnu packages game-development)
13
  (gnu packages games)
14
  (gnu packages geo)
15
  (gnu packages gnucash)
16
  (gnu packages gnuzilla)
17
  (gnu packages ibus)
18
  (gnu packages image-viewers)
19
  (gnu packages inkscape)
20
  (gnu packages lxde)
21
  (gnu packages mail)
22
  (gnu packages messaging)
23
  (gnu packages minetest)
24
  (gnu packages password-utils)
25
  (gnu packages pulseaudio)
26
  (gnu packages sync)
27
  (gnu packages xfce)
28
  (games packages 7-billion-humans)
29
  (games packages baba-is-you)
30
  (games packages factorio)
31
  (games packages hollow-knight)
32
  (games packages mini-metro)
33
  (games packages starsector)
34
  (games packages sunless-skies)
35
  (nongnu packages steam-client)
36
  (guix gexp)
37
38
  (srfi srfi-11); let-values
39
  )
40
41
(define openbox-environment
42
  (plain-file "environment" "eval $(ssh-agent)
43
export GTK_IM_MODULE=ibus
44
export XMODIFIERS=@im=ibus
45
export QT_IM_MODULE=ibus
46
export GUIX_GTK2_IM_MODULE_FILE=/home/tyreunom/.guix-home/profile/lib/gtk-2.0/2.10.0/immodules-gtk2.cache
47
export GUIX_GTK3_IM_MODULE_FILE=/home/tyreunom/.guix-home/profile/lib/gtk-3.0/3.0.0/immodules-gtk3.cache"))
48
49
(define openbox-autostart
50
  (computed-file "autostart"
51
     #~(with-output-to-file #$output
52
         (lambda _
53
           (format #t "~a --bg-fill ~a~%" #$(file-append feh "/bin/feh")
54
                   #$(local-file "/home/tyreunom/background.png"))
55
           (format #t "~a -CGb~%" #$(file-append compton "/bin/compton"))
56
           (format #t "~a -conf ~a &~%" #$(file-append dunst "/bin/dunst")
57
                   #$(plain-file "dunstrc" ""))
58
           (format #t "export GTK_IM_MODULE=ibus
59
export XMODIFIERS=@im=ibus
60
export QT_IM_MODULE=ibus
61
export GUIX_GTK2_IM_MODULE_FILE=~~/.guix-home/profile/lib/gtk-2.0/2.10.0/immodules-gtk2.cache
62
export GUIX_GTK3_IM_MODULE_FILE=~~/.guix-home/profile/lib/gtk-3.0/3.0.0/immodules-gtk3.cache
63
IBUS_COMPONENT_PATH=~~/.guix-home/profile/share/ibus/component ~a -drx~%" #$(file-append ibus "/bin/ibus-daemon"))))))
64
(define openbox-rc (local-file "files/openbox/rc.xml"))
65
66
(define tyreunom-openbox-configuration
67
  (home-openbox-configuration
68
    (autostart openbox-autostart)
69
    (environ openbox-environment)
70
    (rc openbox-rc)
71
    (menus
72
      (list
73
        (home-openbox-menu
74
          (id "apps-game-menu")
75
          (label "Jeux")
76
          (elements
77
            (list
78
              (home-openbox-element-execute
79
                (label "MineTest")
80
                (command (file-append minetest "/bin/minetest")))
81
              ;(home-openbox-element-execute
82
              ;  (label "Starsector")
83
              ;  (command (file-append starsector "/bin/starsector")))
84
              ;(home-openbox-element-execute
85
              ;  (label "Factorio")
86
              ;  (command (file-append factorio "/bin/factorio")))
87
              ;(home-openbox-element-execute
88
              ;  (label "Hollow Knight")
89
              ;  (command (file-append gog-hollow-knight "/bin/hollow-knight")))
90
              ;(home-openbox-element-execute
91
              ;  (label "7 Billion Humans")
92
              ;  (command (file-append gog-7-billion-humans "/bin/7-billion-humans")))
93
              ;(home-openbox-element-execute
94
              ;  (label "Sunless Skies")
95
              ;  (command (file-append gog-sunless-skies "/bin/sunless-skies")))
96
              ;(home-openbox-element-execute
97
              ;  (label "Baba is You")
98
              ;  (command (file-append baba-is-you "/bin/baba-is-you")))
99
              ;(home-openbox-element-execute
100
              ;  (label "Mini Metro")
101
              ;  (command (file-append mini-metro "/bin/mini-metro")))
102
              ;(home-openbox-element-execute
103
              ;  (label "0ad")
104
              ;  (command (file-append 0ad "/bin/0ad")))
105
              ;(home-openbox-element-execute
106
              ;  (label "godot")
107
              ;  (command (file-append godot "/bin/godot"))))))
108
              )))
109
        (home-openbox-menu
110
          (id "apps-other-menu")
111
          (label "Autres")
112
          (elements
113
            (list
114
              (home-openbox-element-execute
115
                (label "Pavucontrol")
116
                (command (file-append pavucontrol "/bin/pavucontrol")))
117
              (home-openbox-element-execute
118
                (label "Owncloud")
119
                (command (file-append owncloud-client "/bin/owncloud")))
120
              (home-openbox-element-execute
121
                (label "Keepass")
122
                (command (file-append keepassxc "/bin/keepassxc")))
123
              (home-openbox-element-execute
124
                (label "Claws-mail")
125
                (command (file-append claws-mail "/bin/claws-mail")))
126
              (home-openbox-element-execute
127
                (label "Hexchat")
128
                (command (file-append hexchat "/bin/hexchat")))
129
              (home-openbox-element-execute
130
                (label "GnuCash")
131
                (command (file-append gnucash "/bin/gnucash")))
132
              (home-openbox-element-execute
133
                (label "JOSM")
134
                (command (file-append josm "/bin/josm")))
135
              (home-openbox-element-execute
136
                (label "Inkscape")
137
                (command (file-append inkscape "/bin/inkscape"))))))))
138
    (root-elements
139
      (list
140
        (home-openbox-element-menu (id "apps-game-menu"))
141
        (home-openbox-element-menu (id "apps-other-menu"))
142
        (home-openbox-element-execute
143
          (label "Terminal")
144
          (command (file-append xfce4-terminal "/bin/xfce4-terminal")))
145
        (home-openbox-element-execute
146
          (label "Navigateur")
147
          (command (file-append icecat "/bin/icecat -P --no-remote")))
148
        (home-openbox-element-execute
149
          (label "Gestionnaire de fichiers")
150
          (command (file-append pcmanfm "/bin/pcmanfm")))))))
151
152
153
(home-environment
154
  (packages
155
    (map (lambda (package)
156
           (let-values (((package output) (specification->package+output package)))
157
             (list package output)))
158
         (list "arc-theme"
159
               "arc-icon-theme"
160
               "hicolor-icon-theme"
161
162
               ;; utilities
163
               "ibus"
164
               "ibus-anthy"
165
               "dconf"
166
               "xdg-user-dirs"
167
168
               ;; gui
169
               "feh"
170
               "mpv"
171
               "gnucash"
172
               "syncthing-gtk"
173
               "syncthing"
174
               "virt-manager"
175
               "zathura-pdf-poppler"
176
               "zathura"
177
178
               ;; cli
179
               "graphviz"
180
               "imagemagick"
181
               "pinentry"
182
               "youtube-dl"
183
               "adb"
184
               "fastboot"
185
               "git:send-email"
186
               "git"
187
               "bind:utils"
188
               "gnupg"
189
               "curl"
190
               "python"
191
               "wget"
192
               "unzip"
193
               "torsocks"
194
               "strace"
195
               "acpi"
196
               "setxkbmap"
197
               "file"
198
199
               ;; guile
200
               "guile"
201
               "guile-readline"
202
203
               ;; editor
204
               "python-pynvim"
205
               "neovim"
206
207
               ;; fonts
208
               "font-terminus"
209
               "font-cozette"
210
               "font-linuxlibertine"
211
               "font-tamzen"
212
               "font-liberation"
213
               "font-fira-code"
214
               "font-inconsolata"
215
               "font-mplus-testflight"
216
               "font-fontna-yasashisa-antique"
217
               "font-dejavu"
218
               "font-ipa-mj-mincho"
219
               "font-wqy-microhei"
220
               "font-google-noto"
221
222
               ;; games
223
               "starsector"
224
               ;"baba-is-you"
225
               "steam"
226
227
               "glibc-locales"
228
               "hunspell-dict-fr-moderne"
229
               "hunspell-dict-fr-reforme1990"
230
               "hunspell-dict-fr")))
231
  (services
232
    (list (service home-bash-service-type
233
                   (home-bash-configuration
234
                     (environment-variables
235
                       `(("GTK_IM_MODULE" . "ibus")
236
                         ("XMODIFIERS" . "@im=ibus")
237
                         ("QT_IM_MODULE" . "ibus")
238
                         ("GUIX_GTK2_IM_MODULE_FILE" . "/home/tyreunom/.guix-home/profile/lib/gtk-2.0/2.10.0/immodules-gtk2.cache")
239
                         ("GUIX_GTK3_IM_MODULE_FILE" . "/home/tyreunom/.guix-home/profile/lib/gtk-3.0/3.0.0/immodules-gtk3.cache")
240
                         ("EDITOR" . "nvim")))
241
                     (bashrc
242
                      (list
243
                        (plain-file "aliases"
244
                                    "alias vim=nvim
245
alias info=\"info --vi-keys\"")))))
246
          (service home-openbox-service-type tyreunom-openbox-configuration)
247
           (simple-service 'nvim-config home-files-service-type
248
             `((".config/nvim/init.vim" ,(plain-file "init.vim" "set tabstop=4
249
set colorcolumn=80
250
set expandtab
251
autocmd FileType latex,tex,text,md,markdown setlocal spell"))))
252
          (simple-service 'xfce4-terminal home-files-service-type
253
            `((".config/xfce4/terminal/terminalrc" ,(local-file "files/xfce4-terminal/terminalrc"))))
254
          (simple-service 'guile home-files-service-type
255
            `((".guile" ,(local-file "files/guilerc"))))
256
          (simple-service 'git home-files-service-type
257
            `((".gitconfig" ,(local-file "files/gitconfig"))))
258
          (simple-service 'gtk home-files-service-type
259
            `((".gtkrc-2.0" ,(plain-file "gtkrc-2.0"
260
                                        "gtk-theme-name=\"Arc-Dark\"
261
gtk-icon-theme-name=\"Arc\""))
262
              (".config/gtk-3.0/settings.ini" ,(plain-file "settings.ini"
263
                                                          "[Settings]
264
gtk-theme-name=Arc-Dark
265
gtk-icon-theme-name=Arc")))))))
266