aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home-configuration.scm229
1 files changed, 125 insertions, 104 deletions
diff --git a/home-configuration.scm b/home-configuration.scm
index 0bae52aa..6c3b7661 100644
--- a/home-configuration.scm
+++ b/home-configuration.scm
@@ -95,56 +95,33 @@ replacement spec (to which `regexp-substitute/global' is applied)."
(cdar substitutions))))
(cdr substitutions))))))))))))
-(home-environment
- (packages
- ;; These packages will show up in the home profile, under ~/.guix-home/profile.
- (cons*
- ;; Install only bind-utils like dig, not the full suite.
- (list (specification->package "bind") "utils")
- (specifications->packages
- '(;; CLI tools
- "adb" "dos2unix" "file" "fzf" "git" "imagemagick" "jq"
- "lesspipe" "nvme-cli" "openssh" "powertop" "pulsemixer" "pv"
- "rsync" "smartmontools" "source-highlight" "tk" "tmux" "tree"
- "xxd" "zip" "unzip"
- ;; Programming languages
- "python" "sbcl"
- ;; Emacs
- "emacs" "emacs-use-package" "emacs-editorconfig" ; TODO: set up EditorConfig
- ;; Shell
- "zsh" "zsh-autosuggestions" "zsh-syntax-highlighting" "zsh-autopair"
- ;; GUI programs
- ;; i3 and Xorg. i3 itself must be installed system-wide for gdm to pick it up.
- ;; acpilight is a drop-in xbacklight replacement, as xbacklight doesn't work on my system.
- "acpilight" "arandr" "dunst" "gnupg" "pinentry-rofi" "gimp"
- "hsetroot" "i3status" "inkscape" "icecat" "kitty"
- "mpv" "nheko" "neomutt" "password-store" "picom" "rofi"
- "signal-desktop" "simple-scan" "xdg-utils" "xdot" "xclip"
- "xdotool" "xdpyinfo" "xev" "xfd" "xfontsel" "xinput" "xkill"
- "xprop" "xrandr" "xrdb" "xsel" "xset" "xwininfo" "zoom"
- "zathura" "zathura-ps" "zathura-pdf-poppler"
- ;; kitty uses startup-notifications, but doesn't pull it.
- ;; TODO: kitty still doesn't find libstartup-notification-1.so,
- ;; even though it's installed by this package. Maybe kitty needs
- ;; its rpath adjusted?
- "startup-notification"
- ;; Ranger can do code highlighting using python-pygments and
- ;; image previews in kitty using python-pillow.
- "ranger" "python-pygments" "python-pillow"
- ; "gnome-keyring" ; installed system-wide; see system-configuration.scm
- ; "geoclue" ; for redshift -- installed system-wide
- ;; Fonts
- "font-inconsolata" "font-fira-code" "font-fira-sans"
- "font-libertinus" "font-openmoji"
- ;; Theming
- "papirus-icon-theme"
- ;; My own packages -- needs GUIX_PACKAGE_PATH to be set; see below.
- "catppuccin-gtk-theme"
- "catppuccin-mocha-dark-cursors"
- "simutrans"))))
-
- ;; To search for available home services, run 'guix home search KEYWORD'.
- (services
+(define gui-packages
+ '(;; i3 and Xorg. i3 itself must be installed system-wide for gdm to pick it up.
+ ;; acpilight is a drop-in xbacklight replacement, as xbacklight doesn't work on my system.
+ "acpilight" "arandr" "gnupg" "gimp" "hsetroot" "i3status"
+ "inkscape" "icecat" "kitty" "mpv" "nheko" "neomutt"
+ "password-store" "rofi" "signal-desktop" "simple-scan"
+ "xdg-utils" "xdot" "xclip" "xdotool" "xdpyinfo" "xev" "xfd"
+ "xfontsel" "xinput" "xkill" "xprop" "xrandr" "xrdb" "xsel"
+ "xset" "xwininfo" "zoom" "zathura" "zathura-ps" "zathura-pdf-poppler"
+ ;; kitty uses startup-notifications, but doesn't pull it.
+ ;; TODO: kitty still doesn't find libstartup-notification-1.so,
+ ;; even though it's installed by this package. Maybe kitty needs
+ ;; its rpath adjusted?
+ "startup-notification"
+ ;; "gnome-keyring" ; installed system-wide; see system-configuration.scm
+ ;; "geoclue" ; for redshift -- installed system-wide
+ ;; Fonts
+ "font-inconsolata" "font-fira-code" "font-fira-sans"
+ "font-libertinus" "font-openmoji"
+ ;; Theming
+ "papirus-icon-theme"
+ ;; My own packages -- needs GUIX_PACKAGE_PATH to be set; see below.
+ "catppuccin-gtk-theme"
+ "catppuccin-mocha-dark-cursors"
+ "simutrans"))
+
+(define gui-services
(list
;; Batsignal: battery level notifications.
(service home-batsignal-service-type
@@ -169,28 +146,21 @@ replacement spec (to which `regexp-substitute/global' is applied)."
;; The dbus service doesn't seem to be added automatically.
(service home-dbus-service-type (home-dbus-configuration))
- ;; User shepherd services.
(simple-service
- 'terminal-services home-shepherd-service-type
+ 'gui-services home-shepherd-service-type
(list
(shepherd-service
- (documentation "Emacs server; connect using emacsclient.")
- (provision '(emacs))
+ (documentation "KDE connect applet.")
+ (provision '(kdeconnect-applet))
(start #~(make-forkexec-constructor
- (list #$(package-binary "emacs") "--fg-daemon")))
+ (list #$(package-binary "kdeconnect" "kdeconnect-indicator"))))
(stop #~(make-kill-destructor)))
(shepherd-service
- (documentation "GPG agent; caches key passwords.")
- (provision '(gpg-agent))
- (start #~(lambda _
- (invoke #$(package-binary "gnupg" "gpg-agent")
- "--daemon" "--no-detach")))
- (stop #~(lambda _
- (invoke "gpg-connect-agent" "killagent" "/bye"))))))
-
- (simple-service
- 'gui-services home-shepherd-service-type
- (list
+ (documentation "Blueman applet; provides a GUI for connection to bluetooth devices.")
+ (provision '(blueman-applet))
+ (start #~(make-forkexec-constructor
+ (list #$(package-binary "blueman" "blueman-applet"))))
+ (stop #~(make-kill-destructor)))
(shepherd-service
(documentation "Dunst notification daemon; displays desktop notifications.")
(provision '(dunst))
@@ -227,21 +197,17 @@ replacement spec (to which `regexp-substitute/global' is applied)."
"--output" "HDMI-1-1" "--mode" "2560x1440" "--rate" "120.00"
"--right-of" "eDP-1"))))))
- ;; User configuration files in $XDG_CONFIG_HOME.
- (service
- home-xdg-configuration-files-service-type
+ ;; Configuration files for GUI programs in $XDG_CONFIG_HOME.
+ (simple-service
+ 'gui-config home-xdg-configuration-files-service-type
`(;; All alibuild needs is an empty file.
- ("alibuild/disable-analytics"
- ,(plain-file "alibuild-disable-analytics" ""))
("dunst/dunstrc" ,(local-file "dunstrc"))
("dunst/dunstrc.d/50-catppuccin.conf"
,(local-file #.(string-append "catppuccin/dunst/src/"
catppuccin-theme-variant ".conf")
"dunst-theme.conf"))
- ("git/config" ,(local-file "gitconfig"))
("gtk-2.0/gtkrc" ,(local-file "gtk2.ini"))
("gtk-3.0/settings.ini" ,(local-file "gtk3.ini"))
- ("htop/htoprc" ,(local-file "htoprc"))
("i3/config" ,(local-file "i3.conf"))
("i3status/config" ,(local-file "i3status.conf"))
("kitty/diff.conf"
@@ -254,9 +220,7 @@ replacement spec (to which `regexp-substitute/global' is applied)."
(local-file #.(string-append "catppuccin/kitty/"
catppuccin-theme-variant ".conf")
"kitty-theme.conf")))
- ("lesskey" ,(local-file "lesskey"))
("picom/picom.conf" ,(local-file "picom.conf"))
- ("ranger/rc.conf" ,(local-file "ranger.conf"))
("rofi/config.rasi"
,(text-file/substitutions "rofi-config.rasi"
(local-file "catppuccin/rofi/basic/.config/rofi/config.rasi")
@@ -274,7 +238,35 @@ replacement spec (to which `regexp-substitute/global' is applied)."
catppuccin-theme-variant)))))
(simple-service
- 'scripts home-files-service-type
+ 'gui-files home-files-service-type
+ `((".icons/default/index.theme" ,(local-file "cursors.ini"))))
+
+ (simple-service
+ 'gui-environment-variables home-environment-variables-service-type
+ `(("TERMINAL" . "kitty")
+ ;; ("GTK3_MODULES" . "$GTK3_MODULES${GTK3_MODULES:+:}libplotinus")
+
+ ;; For appmenu/global menu in Java applications.
+ ;; https://gitlab.com/vala-panel-project/vala-panel-appmenu#experimental-features
+ ;; ("JAYATANA_FORCE" . "1")
+ ;; Appmenu and GTK look-and-feel in Java
+ ;; https://wiki.manjaro.org/index.php?title=Set_all_Java_apps_to_use_GTK%2B_font_%26_theme_settings
+ ;; TODO: install jayatana and add "-javaagent:/usr/share/java/jayatanaag.jar" option
+ ("_JAVA_OPTIONS" .
+ ,(string-append
+ "$_JAVA_OPTIONS${_JAVA_OPTIONS:+ }-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true "
+ "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel "
+ "-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"))
+
+ ;; For programs from kde-servicemenus-pdf.
+ ;; ("LANGUAGE" . "en")
+
+ ;; Smooth trackpad scrolling in Firefox/Icecat.
+ ;; https://wiki.archlinux.org/index.php/Firefox/Tweaks#Pixel-perfect_trackpad_scrolling
+ ("MOZ_USE_XINPUT2" . "1")))
+
+ (simple-service
+ 'gui-scripts home-files-service-type
`(;; https://sw.kovidgoyal.net/kitty/kittens/diff/
(".local/bin/kdiff"
,(program-file "kdiff" #~(apply execl #$(package-binary "kitty") "kitty"
@@ -346,11 +338,60 @@ replacement spec (to which `regexp-substitute/global' is applied)."
(increment-sink-volume!
(string->number increment-percent))))
(args (error "Could not parse command-line arguments:" args)))
- (notify)))))))
+ (notify)))))))))
+
+(home-environment
+ (packages
+ ;; These packages will show up in the home profile, under ~/.guix-home/profile.
+ `(;; Install only bind-utils like dig, not the full suite.
+ (,(specification->package "bind") "utils")
+ ,@(specifications->packages gui-packages)
+ ,@(specifications->packages
+ '(;; CLI tools
+ "adb" "dos2unix" "file" "fzf" "git" "imagemagick" "jq"
+ "lesspipe" "nvme-cli" "openssh" "powertop" "pulsemixer" "pv"
+ "python" "rsync" "sbcl" "smartmontools" "source-highlight"
+ "tk" "tmux" "tree" "xxd" "zip" "unzip"
+ ;; Emacs
+ "emacs" "emacs-use-package" "emacs-editorconfig" ; TODO: set up EditorConfig
+ ;; Shell
+ "zsh" "zsh-autosuggestions" "zsh-syntax-highlighting" "zsh-autopair"
+ ;; Ranger can do code highlighting using python-pygments and
+ ;; image previews in kitty using python-pillow.
+ "ranger" "python-pygments" "python-pillow"))))
+ ;; To search for available home services, run 'guix home search KEYWORD'.
+ (services
+ (cons*
+ ;; User shepherd services.
(simple-service
- 'gui-files home-files-service-type
- `((".icons/default/index.theme" ,(local-file "cursors.ini"))))
+ 'terminal-services home-shepherd-service-type
+ (list
+ (shepherd-service
+ (documentation "Emacs server; connect using emacsclient.")
+ (provision '(emacs))
+ (start #~(make-forkexec-constructor
+ (list #$(package-binary "emacs") "--fg-daemon")))
+ (stop #~(make-kill-destructor)))
+ (shepherd-service
+ (documentation "GPG agent; caches key passwords.")
+ (provision '(gpg-agent))
+ (start #~(lambda _
+ (invoke #$(package-binary "gnupg" "gpg-agent")
+ "--daemon" "--no-detach")))
+ (stop #~(lambda _
+ (invoke "gpg-connect-agent" "killagent" "/bye"))))))
+
+ ;; Configuration files for terminal-only programs in $XDG_CONFIG_HOME.
+ (service
+ home-xdg-configuration-files-service-type
+ `(;; All alibuild needs is an empty file.
+ ("alibuild/disable-analytics"
+ ,(plain-file "alibuild-disable-analytics" ""))
+ ("git/config" ,(local-file "gitconfig"))
+ ("htop/htoprc" ,(local-file "htoprc"))
+ ("lesskey" ,(local-file "lesskey"))
+ ("ranger/rc.conf" ,(local-file "ranger.conf"))))
(simple-service
'terminal-files home-files-service-type
@@ -370,7 +411,7 @@ auto-expand-secmem
(local-file "prompt.zsh")))))
(simple-service
- 'custom-environment-variables home-environment-variables-service-type
+ 'terminal-environment-variables home-environment-variables-service-type
`(;; Path to my own package definitions. If invoking `guix home'
;; afresh, this needs to be set manually to find these packages.
("GUIX_PACKAGE_PATH" . "$HOME/src/packages/guix")
@@ -385,7 +426,6 @@ auto-expand-secmem
;; file. I can't put this in $EDITOR as many programs expect
;; $EDITOR to exit only when the user is done editing.
("ASYNC_EDITOR" . "emacsclient -qcn")
- ("TERMINAL" . "kitty")
("PAGER" . "less")
;; Guix force-overrides $LESS by default, so force-force it to do what I want instead.
;; `less' reads the `lesskey' file configured above.
@@ -398,30 +438,9 @@ auto-expand-secmem
("LEDGER_FILE" . "$HOME/sync/ledger/ledger.journal")
("GTAGSLABEL" . "pygments")
- ;; ("GTK3_MODULES" . "$GTK3_MODULES${GTK3_MODULES:+:}libplotinus")
-
;; Disable at-spi-dbus-launcher accessibility service.
("NO_AT_BRIDGE" . "1")
- ;; For appmenu/global menu in Java applications.
- ;; https://gitlab.com/vala-panel-project/vala-panel-appmenu#experimental-features
- ;; ("JAYATANA_FORCE" . "1")
- ;; Appmenu and GTK look-and-feel in Java
- ;; https://wiki.manjaro.org/index.php?title=Set_all_Java_apps_to_use_GTK%2B_font_%26_theme_settings
- ;; TODO: install jayatana and add "-javaagent:/usr/share/java/jayatanaag.jar" option
- ("_JAVA_OPTIONS" .
- ,(string-append
- "$_JAVA_OPTIONS${_JAVA_OPTIONS:+ }-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true "
- "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel "
- "-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"))
-
- ;; For programs from kde-servicemenus-pdf.
- ;; ("LANGUAGE" . "en")
-
- ;; Smooth trackpad scrolling in Firefox/Icecat.
- ;; https://wiki.archlinux.org/index.php/Firefox/Tweaks#Pixel-perfect_trackpad_scrolling
- ("MOZ_USE_XINPUT2" . "1")
-
;; Auto-compilation is annoying and creates a bunch of files that are never cleaned up.
("GUILE_AUTO_COMPILE" . "0")
@@ -442,7 +461,7 @@ auto-expand-secmem
;; The `home-xdg-base-directories' service (enabled by default) sets $XDG_* variables for us.
(simple-service
'xdg-spec-compliance home-environment-variables-service-type
- `(("ANDROID_EMULATOR_HOME" . "$XDG_DATA_HOME/android-emulator")
+ '(("ANDROID_EMULATOR_HOME" . "$XDG_DATA_HOME/android-emulator")
("ASPELL_CONF" . "per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; home-dir $XDG_DATA_HOME/aspell")
("BUP_DIR" . "$XDG_DATA_HOME/bup")
("CARGO_HOME" . "$XDG_DATA_HOME/cargo")
@@ -566,4 +585,6 @@ ProxyJump \"twilken@lxplus.cern.ch\"
(make-channel-introduction
"c23d64f1b8cc086659f8781b27ab6c7314c5cca5"
(openpgp-fingerprint
- "50F3 3E2E 5B0C 3D90 0424 ABE8 9BDC F497 A4BB CC7F")))))))))
+ "50F3 3E2E 5B0C 3D90 0424 ABE8 9BDC F497 A4BB CC7F"))))))
+
+ gui-services)))