;;; Copyright © 2025-2026 bdunahu (define-module (kolwynia home bdunahu) #:use-module (gnu) #:use-module (gnu home services) #:use-module (gnu services xorg) #:use-module (gnu home services desktop) #:use-module (gnu home services dict) #:use-module (gnu home services dotfiles) #:use-module (gnu home services gnupg) #:use-module (gnu home services guix) #:use-module (gnu home services mail) #:use-module (gnu home services mcron) #:use-module (gnu home services shells) #:use-module (gnu home services shepherd) #:use-module (gnu home services ssh) #:use-module (gnu home services syncthing) #:use-module (gnu home services xdg) #:use-module (gnu packages gnupg) ;pinentry-emacs #:use-module (kolwynia utils) #:use-module ((kolwynia channels) #:prefix channel:) #:use-module ((kolwynia home bdunahu packages) #:prefix pkgs:) #:use-module ((kolwynia home bdunahu app-preferences) #:prefix app:) #:use-module ((kolwynia home bdunahu ssh) #:prefix ssh-host:) #:use-module ((kolwynia home bdunahu mail) ;gitignored #:prefix mail:) #:use-module (gnu home) #:export (bdunahu-main bdunahu-games)) ;;; Commentary: ;;; Code: (define bdunahu-base-packages `(,@pkgs:emacs ,@pkgs:browser)) (define bdunahu-base (home-environment (packages bdunahu-base-packages) (services (list (service home-shepherd-service-type) (service home-dicod-service-type) (service home-syncthing-service-type) (service home-channels-service-type (list channel:guix channel:tanelorn)) (service home-dotfiles-service-type (home-dotfiles-configuration (directories '("./bdunahu/files")))) (service home-xdg-user-directories-service-type (home-xdg-user-directories-configuration (desktop "$HOME/dl") (documents "$HOME/dc") (download "$HOME/dl") (music "$HOME/ik") (pictures "$HOME/md/ig") (publicshare "$HOME") (templates "$HOME") (videos "$HOME/md/vi"))) (service home-bash-service-type (home-bash-configuration (aliases '(("aardwolf" . "telnet aardmud.org 23") ("auth" . "echo -e \"$PWD\n\" >> $HOME/.config/guix/shell-authorized-directories") ("cp" . "cp -i") ("grep" . "grep --color=auto") ("guix-rcfg" . "sudo guix system -L ${HOME}/.dotfiles/ reconfigure ${HOME}/.dotfiles/kolwynia/os/${HOSTNAME}.scm") ("ll" . "ls -l") ("ls" . "ls -p --color=auto") ("mkd" . "mkdir -pv") ("mv" . "mv -i") ("rm" . "rm -i") ("suspend" . "sudo loginctl suspend") ("usb0-shell" . "screen /dev/ttyUSB0 115200") ("vi" . "vim") ("xeb" . "emacsclient -nce '(switch-to-buffer nil)'") ("xet" . "emacsclient -nce '(shell)'") ("ytta" . "yt-dlp --extract-audio --format bestaudio/best") ("yttv" . "yt-dlp -f b"))) (bashrc (list (plain-file "bashrc" " # converts above aliases into eshell aliases automatically alias | sed -E \"s/^alias ([^=]+)='(.*)'$/alias \\1 \\2 \\$*/g; s/'\\\\\\''/'/g;\" >~/.config/emacs/eshell/alias "))) (environment-variables `(("PATH" . "$HOME/.local/bin:$PATH") ("BROWSER" . ,(car app:default-browser)) ("VISUAL" . ,(car app:default-editor)) ("EDITOR" . ,(car app:default-editor)) ("NETHACKOPTIONS" . "@$XDG_CONFIG_HOME/nethack/config") ("ZATHURA_PLUGINS_PATH" . "$HOME/.guix-home/profile/lib/zathura"))))) (service home-openssh-service-type (home-openssh-configuration (hosts (list ssh-host:garmr ssh-host:heimdallr ssh-host:nott ssh-host:surt ssh-host:codeberg)))) (service home-xdg-mime-applications-service-type (home-xdg-mime-applications-configuration (default app:mime-app-alist) (desktop-entries (list (xdg-desktop-entry (file "torrent") (name "Torrent") (type 'application) (config '((exec . "transmission-remote -a %u")))))))))))) (define bdunahu-xorg (home-environment (inherit bdunahu-base) (packages `(,@bdunahu-base-packages ,@pkgs:desktop ,@pkgs:emacs-desktop ,@pkgs:fonts ,@pkgs:media ,@pkgs:pdf)) (services (cons* (service home-mcron-service-type (home-mcron-configuration (jobs (list #~(job (lambda (current-time) (+ current-time (* 5 60))) "~/.local/bin/set-t1"))))) (simple-service 'xorg-dot home-files-service-type `((".Xresources" ,(plain-file "Xresources" " Nsxiv.window.background: #000000 Nsxiv.window.foreground: #FFFFFF Nsxiv.bar.font: MedievalSharp:size=9 ")) (".config/gtk-2.0/settings.ini" ,(plain-file "settings.ini" "[Settings] gtk-application-prefer-dark-theme=1\n")) (".config/gtk-3.0/settings.ini" ,(plain-file "settings.ini" "[Settings] gtk-application-prefer-dark-theme=1\n")))) (home-environment-user-services bdunahu-base))))) (define bdunahu-main (home-environment (inherit bdunahu-xorg) (packages `(,@bdunahu-base-packages ,@pkgs:desktop ,@pkgs:development ,@pkgs:emacs-desktop ,@pkgs:emacs-devel ,@pkgs:emulators ,@pkgs:fonts ,@pkgs:mail ,@pkgs:media ,@pkgs:pass ,@pkgs:pdf ,@pkgs:reverse-engineering ,@pkgs:tex ,@pkgs:university ,@pkgs:games)) (services (cons* (service home-startx-command-service-type) (service home-gpg-agent-service-type (home-gpg-agent-configuration (pinentry-program (file-append pinentry-emacs "/bin/pinentry-emacs")) (ssh-support? #t) (default-cache-ttl 28800) (max-cache-ttl 28800) (default-cache-ttl-ssh 28800) (max-cache-ttl-ssh 28800))) (service home-xdg-configuration-files-service-type `(("gdbinit" ,(plain-file (plain-file-name %default-gdbinit) (string-append (plain-file-content %default-gdbinit) "set disassembly-flavor intel set confirm no set history filename ~/.cache/gdb/history set history save on set history size unlimited"))))) (service home-msmtp-service-type (home-msmtp-configuration (defaults (msmtp-configuration (port 587) (tls? #t) (tls-starttls? #t) (log-file "/home/bdunahu/.local/state/msmtp.log") (auth? #t))) (accounts (list mail:operationnull mail:umass)) (default-account "operationnull"))) (modify-services (home-environment-user-services bdunahu-xorg) (home-mcron-service-type config => (home-mcron-configuration (jobs (list #~(job ;; twenty minutes (lambda (current-time) (+ current-time (* 20 60))) "offlineimap") #~(job (lambda (current-time) (+ current-time (* 5 60))) "~/.local/bin/set-t1")))))))))) (define bdunahu-games (home-environment (inherit bdunahu-xorg) (packages `(,@bdunahu-base-packages ,@pkgs:desktop ,@pkgs:emacs-desktop ,@pkgs:fonts ,@pkgs:media ,@pkgs:pdf ,@pkgs:games)) (services (cons* (service home-startx-command-service-type (xorg-configuration (modules (cons (specification->package "nvda") %default-xorg-modules)) (drivers '("nvidia")))) (modify-services (home-environment-user-services bdunahu-xorg) (home-channels-service-type config => (list channel:guix channel:tanelorn channel:nonguix))))))) ;;; bdunahu.scm ends here