sybil-home.scm
| 1 | (use-modules (home openbox)) |
| 2 | (use-modules (home utils)) |
| 3 | (use-modules (home)) |
| 4 | (use-modules (gnu packages compton)) |
| 5 | (use-modules (gnu packages dunst)) |
| 6 | (use-modules (gnu packages games)) |
| 7 | (use-modules (gnu packages ibus)) |
| 8 | (use-modules (gnu packages image-viewers)) |
| 9 | (use-modules (gnu packages pulseaudio)) |
| 10 | (use-modules (gnu packages xfce)) |
| 11 | (use-modules (guix gexp)) |
| 12 | (use-modules (guix import utils)); for flatten |
| 13 | |
| 14 | (define bashrc |
| 15 | (computed-file "bashrc" |
| 16 | #~(with-output-to-file #$output |
| 17 | (lambda _ |
| 18 | (format #t "export SHELL |
| 19 | |
| 20 | if [[ $- != *i* ]]; then |
| 21 | # Non interative shell. For SSH session, load /etc/profile to get |
| 22 | # PATH and other variables set up. |
| 23 | [[ -n \"$SSH_CLIENT\" ]] && source /etc/profile |
| 24 | return |
| 25 | fi |
| 26 | |
| 27 | source /etc/bashrc |
| 28 | |
| 29 | if [ -n \"$GUIX_ENVIRONMENT\" ]; then |
| 30 | PS1='\\u@\\h \\w [env]\\$ ' |
| 31 | else |
| 32 | PS1='\\u@\\h \\w\\$ ' |
| 33 | fi |
| 34 | alias ls='ls -p --color=auto' |
| 35 | alias ll='ls -l' |
| 36 | alias grep='grep --color=auto' |
| 37 | alias vim='nvim'"))))) |
| 38 | |
| 39 | (define bash_profile |
| 40 | (plain-file "bash_profile" "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi |
| 41 | ")) |
| 42 | |
| 43 | (define gtkrc-2 |
| 44 | (plain-file "gtkrc-2.0" "gtk-theme-name=\"Arc-Dark\" |
| 45 | gtk-icon-theme-name=\"Arc\" |
| 46 | ")) |
| 47 | |
| 48 | (define gtkrc-3 |
| 49 | (plain-file "settings.ini" "[Settings] |
| 50 | gtk-theme-name=Arc-Dark |
| 51 | gtk-icon-theme-name=Arc |
| 52 | ")) |
| 53 | |
| 54 | (define gitconfig (local-file "files/gitconfig")) |
| 55 | (define openbox-rc (local-file "files/openbox/rc.xml")) |
| 56 | (define openbox-autostart |
| 57 | (computed-file "autostart" |
| 58 | #~(with-output-to-file #$output |
| 59 | (lambda _ |
| 60 | (format #t "HOME=/tmp/pa ~a --start~%" #$(file-append pulseaudio "/bin/pulseaudio")) |
| 61 | (format #t "~a --bg-fill ~a~%" #$(file-append feh "/bin/feh") |
| 62 | #$(local-file "/data/tyreunom/background.png")) |
| 63 | (format #t "~a -CGb~%" #$(file-append compton "/bin/compton")) |
| 64 | (format #t "~a -conf ~a &~%" #$(file-append dunst "/bin/dunst") |
| 65 | #$(plain-file "dunstrc" "")) |
| 66 | (format #t "export GTK_IM_MODULE=ibus |
| 67 | export XMODIFIERS=@im=ibus |
| 68 | export QT_IM_MODULE=ibus |
| 69 | export GUIX_GTK2_IM_MODULE_FILE=~~/.guix-profile/lib/gtk-2.0/2.10.0/immodules-gtk2.cache |
| 70 | export GUIX_GTK3_IM_MODULE_FILE=~~/.guix-profile/lib/gtk-3.0/3.0.0/immodules-gtk3.cache |
| 71 | ~a -drx~%" #$(file-append ibus "/bin/ibus-daemon")))))) |
| 72 | |
| 73 | (define xfce4-terminalrc |
| 74 | (local-file "files/xfce4-terminal/terminalrc")) |
| 75 | |
| 76 | (home |
| 77 | (flatten |
| 78 | (list |
| 79 | (openbox-home (openbox-configuration |
| 80 | (autostart openbox-autostart) |
| 81 | (menus |
| 82 | (list |
| 83 | (openbox-menu |
| 84 | (id "apps-game-menu") |
| 85 | (label "Jeux") |
| 86 | (elements |
| 87 | (list |
| 88 | (openbox-element-execute |
| 89 | (label "MineTest") |
| 90 | (command (file-append minetest "/bin/minetest")))))))) |
| 91 | (root-elements |
| 92 | (list |
| 93 | (openbox-element-menu (id "apps-game-menu")) |
| 94 | (openbox-element-execute |
| 95 | (label "Terminal") |
| 96 | (command (file-append xfce4-terminal "/bin/xfce4-terminal"))))) |
| 97 | (rc openbox-rc))) |
| 98 | (simple-file-home bashrc ".bashrc") |
| 99 | (simple-file-home bash_profile ".bash_profile") |
| 100 | (simple-file-home gitconfig ".gitconfig") |
| 101 | (simple-file-home gtkrc-2 ".gtkrc-2.0") |
| 102 | (simple-file-home gtkrc-3 ".config/gtk-3.0/settings.ini") |
| 103 | (simple-file-home xfce4-terminalrc ".config/xfce4/terminal/terminalrc")))) |
| 104 |