summaryrefslogtreecommitdiff
path: root/.config/guix/common.scm
diff options
context:
space:
mode:
Diffstat (limited to '.config/guix/common.scm')
-rw-r--r--.config/guix/common.scm66
1 files changed, 66 insertions, 0 deletions
diff --git a/.config/guix/common.scm b/.config/guix/common.scm
new file mode 100644
index 0000000..64666d7
--- /dev/null
+++ b/.config/guix/common.scm
@@ -0,0 +1,66 @@
+(define-module (common)
+ #:use-module (gnu)
+ #:use-module (gnu services)
+ #:use-module (gnu home)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services shells)
+ #:use-module (gnu home services mcron)
+ #:use-module (guix gexp))
+
+(define-public common-home-services
+ (list
+ ;; Set up the shell environment
+ (service home-bash-service-type
+ (home-bash-configuration
+ (bash-profile
+ `(,(plain-file "bash-profile-extras"
+ (string-append
+ ;; Load the Nix profile
+ "if [ -f /run/current-system/profile/etc/profile.d/nix.sh ]; then\n"
+ " . /run/current-system/profile/etc/profile.d/nix.sh\n"
+ "fi\n"
+
+ ;; Don't use the system-level PulseAudio configuration
+ "unset PULSE_CONFIG\n"
+ "unset PULSE_CLIENTCONFIG\n"))))
+
+ (environment-variables
+ '( ;; Sort hidden (dot) files first in `ls` listings
+ ("LC_COLLATE" . "C")
+
+ ;; Emacs is our editor
+ ("VISUAL" . "emacsclient")
+ ("EDITOR" . "emacsclient")
+
+ ;; Add some things to $PATH (maybe integrate into other services?)
+ ("PATH" . "$HOME/.dotfiles/.bin:$HOME/.npm-global/bin:$PATH")
+
+ ;; Make sure Flatpak apps are visible
+ ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share")
+
+ ;; Make sure JAVA_HOME is set
+ ;; TODO: Move this to a different service
+ ("JAVA_HOME" . "$(dirname $(dirname $(readlink $(which java))))")
+
+ ;; Fix issues with Qutebrowser
+ ;; TODO: Move this to Qutebrowser service
+ ("QTWEBENGINE_CHROMIUM_FLAGS" . "--disable-seccomp-filter-sandbox")
+
+ ;; Set the SSH authentication socket
+ ;; TODO: Move to a gpg service
+ ("SSH_AUTH_SOCK" . "$(gpgconf --list-dirs agent-ssh-socket)")))))
+
+ ;; Set up desktop environment
+
+
+ ;; Start background jobs
+ (service home-mcron-service-type
+ (home-mcron-configuration
+ (jobs
+ (list
+ #~(job
+ '(next-hour (range 0 24 4))
+ "~/.dotfiles/.bin/sync-passwords")))))))
+
+ ;; Udiskie for auto-mounting devices
+