-
Notifications
You must be signed in to change notification settings - Fork 1
/
home.scm
171 lines (149 loc) · 5.8 KB
/
home.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
(use-modules
(gnu)
(guix)
(guix gexp)
(guix build utils)
(guix utils)
(guix modules)
(guix channels)
(gnu home)
(gnu services)
(gnu packages)
(gnu packages gnupg)
(gnu packages qt)
(gnu home services)
(gnu home services syncthing)
(gnu home services dotfiles)
(gnu home services shepherd)
(gnu home services gnupg)
(gnu home services xdg)
(gnu home services desktop)
(gnu home services sound)
(gnu home services shells)
(gnu home services guix)
(personal services symlinks)
(srfi srfi-1)
(srfi srfi-11))
(define %pkg-android
'("adb" "fdroidcl" "socat" "scrcpy"))
(define %pkg-utils
'("aria2" "curl" "rsync" "plocate"
"atool" "p7zip" "unzip" "jq" "openssh"
"ripgrep" "moreutils" "libiconv"
"powertop" "graphviz" "borgmatic" "bind:utils" ; dig
"graphicsmagick" "libwebp" "jpegoptim"
"flatpak" "xdg-desktop-portal"
"lshw" "strace" "nftables" "file" "lsof"))
(define %pkg-desktop
'("pavucontrol" "dunst" "flameshot" "wireplumber"
"lemonbar-xft" "xss-lock" "redshift" "unclutter" "playerctl"))
(define %pkg-fonts
'("font-fira-code"
"font-google-noto-emoji" ; 💪🕹
"font-hack"
"font-terminus"))
(define %pkg-x11
'("picom" "xhost" "xkbcomp" "xkbset" "xkb-switch"
"xprop" "xrandr" "xset" "xwininfo"
"xev" "xclip" "xinput"
"hicolor-icon-theme" "tango-icon-theme" "adwaita-icon-theme"
"greybird-gtk-theme"))
(define %pkg-games
'(;; "lierolibre" "chroma" "meandmyshadow" "gcompris-qt"
;; "tipp10" "quakespasm" "sgt-puzzles" "xonotic"
"quake3e"))
(define %pkg-apps
'("qutebrowser"
;; "zeal" "qalculate-gtk" "simplescreenrecorder"
"libreoffice" "qview" "stapler" "gimp"
;; "nomacs"
"zathura" "zathura-pdf-mupdf" "zathura-djvu" "zathura-cb"
"yt-dlp" "mpv"
"fava" "beancount"
))
(define %pkg-dev
'("python" "make" "fossil"
"git" "git:send-email" "git-crypt" "perl"
"libvirt" "virt-manager" "sicp" "openjdk:jdk" "clojure-tools"))
(define symlinks
(resolve-relative-to "/storage/"
'(("Sync")
("Resources")
("devel")
("devel/dotfiles" . ".dotfiles")
("Sync/pass" . ".password-store")
("data/telega" . ".telega")
("data/mail" . ".mail")
;; ("data/gnupg" . ".gnupg") ; TODO: clashes with home service
("data/events" . ".events")
("data/syncthing" . ".config/syncthing")
("data/qutebrowser" . ".local/share/qutebrowser")
("apps/quake3" . ".q3a"))))
(define (x-autostart-on tty)
(simple-service
'x-autostart home-shell-profile-service-type
(list (mixed-text-file
"x-autostart"
"[[ ! $DISPLAY && $(tty) == /dev/" tty " ]] && "
"exec startx"
))))
(define %emacs-home (load "./emacs-home.scm"))
(home-environment
(packages
(append (home-environment-packages %emacs-home)
(map (compose list specification->package+output)
(append %pkg-android
%pkg-games
%pkg-utils
%pkg-desktop
%pkg-fonts
%pkg-x11
%pkg-dev
%pkg-apps))))
(services
(append
(home-environment-user-services %emacs-home)
(list (service home-bash-service-type)
(x-autostart-on "tty1")
(service home-pipewire-service-type)
(service home-symlinks-service-type symlinks)
(service home-syncthing-service-type)
(service home-dbus-service-type)
(service home-dotfiles-service-type
(home-dotfiles-configuration
(layout 'stow)
(directories '(".."))
(packages '("backup" "android" "email" "xsession" "git" "qutebrowser" "desktop"))))
(simple-service 'configs
home-xdg-configuration-files-service-type
`(("mpv/scripts/mpris.so"
,(file-append (specification->package "mpv-mpris") "/lib/mpris.so"))
("mpv/fonts" ,(file-append (specification->package "mpv-uosc") "/share/mpv/fonts"))
("mpv/scripts/thumbfast.lua"
,(file-append (specification->package "mpv-thumbfast") "/share/mpv/scripts/thumbfast.lua"))
("mpv/script-opts/thumbfast.conf"
,(mixed-text-file "thumbfast.conf" "network=yes"))
("mpv/scripts/uosc"
,(file-append (specification->package "mpv-uosc") "/share/mpv/scripts/uosc"))))
(simple-service 'extra-channels
home-channels-service-type
(list
(channel
(name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
;; Enable signature verification:
(introduction
(make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
(openpgp-fingerprint
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
(channel
(name 'personal)
(url "https://github.com/sarg/dotfiles"))))
(simple-service 'additional-env-vars-service
home-environment-variables-service-type
`(("PATH" . "$HOME/.local/bin:$PATH")
("QT_PLUGIN_PATH" . ,(file-append qtwayland "/lib/qt6/plugins"))
("QT_QPA_PLATFORM_PLUGIN_PATH" . ,(file-append qtwayland "/lib/qt6/plugins/platforms"))
("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share")
("BROWSER". "qutebrowser")))))))