diff options
author | bd <bdunahu@operationnull.com> | 2025-01-25 15:15:56 -0500 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-01-25 15:15:56 -0500 |
commit | 93b2088a04c13a9f4f5934948fc9540f9f552b00 (patch) | |
tree | d3339859c47ab55fd0ded0f7acf90c30c412a0d5 /.config/guix/modules/base.scm | |
parent | a76f5a41c36311103786e43e2497cf93c613edde (diff) |
Refactor guix config for a single central packages file
Diffstat (limited to '.config/guix/modules/base.scm')
-rw-r--r-- | .config/guix/modules/base.scm | 289 |
1 files changed, 0 insertions, 289 deletions
diff --git a/.config/guix/modules/base.scm b/.config/guix/modules/base.scm deleted file mode 100644 index 389ff56..0000000 --- a/.config/guix/modules/base.scm +++ /dev/null @@ -1,289 +0,0 @@ -(define-module (modules base) - #:use-module (gnu) - #:use-module (gnu home services) - #:use-module (gnu home services dict) - #:use-module (gnu home services gnupg) - #: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 xdg) - #:use-module (ice-9 rdelim) - #:use-module (gnu system) - #:use-module (guix gexp) - #:use-module (modules emacs) - #:export (bd-base-system-packages - bd-base-system-services - bd-base-home-services)) - -(use-service-modules admin avahi base - dbus desktop file-sharing - networking ssh) - -(use-package-modules - admin ;; netcat - algebra ;; bc - commencement ;; gcc-toolchain - compression ;; unzip, zip - cryptsetup ;; cryptsetup - curl ;; curl - databases ;; recutils - education ;; anki - emulators ;; mupen64plus*, bsnes, mgba - fonts ;; font-terminus, font-openmoji, font-awesome - fontutils ;; fontconfig - games ;; nethack - gimp ;; gimp-next - gnupg ;; gnupg, pinentry, pinentry-emacs - gnuzilla ;; icecat - graphviz ;; graphviz - image ;; flameshot - imagemagick ;; imagemagick - image-viewers ;; nsxiv - librewolf ;; librewolf - linux ;; sysstat - mail ;; offlineimap - man ;; man-pages - package-management ;; stow - password-utils ;; pass-otp, password-store - pdf ;; xpdf, pdfgrep, zathura, zathura-pdf-mupdf - python ;; python - rsync ;; rsync - screen ;; screen - rust-apps ;; ripgrep - texlive ;; texlive - tex ;; texlive-dvipng - tor-browsers ;; tor-browser - version-control ;; git - video ;; ffmpeg, mpv, yt-dlp - vim ;; vim - web ;; jq - ) - -(define (read-hosts filename) - (let ((port (open-input-file filename))) - (let loop ((lines '())) - (let ((line (read-line port))) - (if (eof-object? line) - (begin (close-input-port port) - lines) - (loop (cons line lines))))))) - -(define base - (list - gnupg - offlineimap3 - pass-otp - password-store - pinentry-emacs - screen - xpdf ; pdftotext - yt-dlp - - anki - bc - cryptsetup - curl - gcc-toolchain - git - jq - man-pages - netcat - nsxiv - pdfgrep - python - recutils - ripgrep - rsync - stow - sysstat - texlive - texlive-dvipng - unzip - vim - zathura - zathura-pdf-mupdf ; epub - zip - )) - -(define desk - (list - bsnes - ffmpeg - flameshot - font-awesome - fontconfig - font-openmoji - font-terminus - gimp - graphviz - icecat - imagemagick - librewolf - mgba - mpv - mupen64plus-audio-sdl - mupen64plus-rsp-hle - mupen64plus-ui-console - nethack - torbrowser - )) - -(define bd-base-system-packages - (append! - base - desk - %base-packages - )) - -(define bd-base-system-services - `( - ;; so that non-root users in the wheel group can - ;; perform administrative tasks (similar to "sudo"). - ,polkit-wheel-service - ;; The global fontconfig cache directory can sometimes contain - ;; stale entries, possibly referencing fonts that have been GC'd, - ;; so mount it read-only. - ,fontconfig-file-system-service - - ,(service network-manager-service-type) - ,(service wpa-supplicant-service-type) ; needed by NetworkManager - ,(service modem-manager-service-type) - ,(service usb-modeswitch-service-type) - - ;; The D-Bus clique. - ,(service avahi-service-type) - ,(service udisks-service-type) - ,(service upower-service-type) - ,(service accountsservice-service-type) - ,(service cups-pk-helper-service-type) - ,(service colord-service-type) - ,(service geoclue-service-type) - ,(service polkit-service-type) - ,(service elogind-service-type - (elogind-configuration - (handle-power-key 'hibernate) - )) - ,(service dbus-root-service-type) - - ,(service ntp-service-type) - - ,(service openssh-service-type - (openssh-configuration - (x11-forwarding? #t) - (permit-root-login 'prohibit-password) - (password-authentication? #f))) - ,(service tor-service-type) - ,(simple-service 'add-extra-hosts - hosts-service-type - (map - (lambda (x) - (host "0.0.0.0" x)) - (read-hosts "/home/bdunahu/.config/guix/assets/blocklist.txt"))) - ,@%base-services)) - -(define bd-base-home-services - (list - (service bd-home-emacs-service-type) - (service home-shepherd-service-type) - - (service home-dicod-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-bash-service-type - (home-bash-configuration - (aliases '(("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}/.config/guix/ reconfigure ${HOME}/.config/guix/${HOSTNAME}.scm") - ("ll" . "ls -l") - ("ls" . "ls -p --color=auto") - ("mkd" . "mkdir -pv") - ("mv" . "mv -i") - ("rm" . "rm -i") - ("suspend" . "sudo loginctl suspend") - ("rig-shell" . "sudo 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 - '( - ("BROWSER" . "icecat") - - ("VISUAL" . "emacsclient") - ("EDITOR" . "emacsclient") - - ("NETHACKOPTIONS" . "@$XDG_CONFIG_HOME/nethack/config") - - ("PATH" . "$HOME/.local/bin:$PATH") - ("ZATHURA_PLUGINS_PATH" . "/run/current-system/profile/lib/zathura") - )))) - - (service home-mcron-service-type - (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"))))) - - (service home-openssh-service-type - (home-openssh-configuration - (hosts - (list (openssh-host (name "garm") - (host-name "localhost") - (user "root")) - (openssh-host (name "vali") - (host-name "192.168.1.136") - (user "bdunahu")) - (openssh-host (name "ivaldi") - (host-name "192.168.1.250") - (user "root")) - (openssh-host (name "heimdallr") - (host-name "operationnull.com") - (user "root")))))) - - (service home-xdg-user-directories-service-type - (home-xdg-user-directories-configuration - (desktop "$HOME/dl") - (documents "$HOME/dc") - (download "$HOME/dl") - (music "$HOME/ik/music") - (pictures "$HOME/md/ig") - (publicshare "$HOME") - (templates "$HOME") - (videos "$HOME/md/vi"))) - - (service home-xdg-mime-applications-service-type - (home-xdg-mime-applications-configuration - (default - '((application/x-bittorrent . torrent.desktop) - (x-scheme-handler/magnet . torrent.desktop))) - (desktop-entries - (list - (xdg-desktop-entry - (file "torrent") - (name "Torrent") - (type 'application) - (config '((exec . "transmission-remote -a %u")))))))))) |