system-configuration/homes/tachikoma.scm

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