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