guix: break down monolithic profile into multiple smaller profiles
authorAmin Bandali <mab@gnu.org>
Sat, 14 Mar 2020 01:22:30 +0000 (21:22 -0400)
committerAmin Bandali <mab@gnu.org>
Sat, 14 Mar 2020 01:22:30 +0000 (21:22 -0400)
super useful for decoupling larger packages like icecat, libreoffice,
and texlive from the rest of mostly-smaller packages, so i could
easily `guix pull' and update the smaller ones as frequently as i like

.bashrc
.config/guix/manifest/chaman.scm [deleted file]
.config/guix/manifest/doc.scm [new file with mode: 0644]
.config/guix/manifest/main.scm [new file with mode: 0644]
.config/guix/manifest/media.scm [new file with mode: 0644]
.config/guix/manifest/web.scm [new file with mode: 0644]
.profile

diff --git a/.bashrc b/.bashrc
index a48c605..7e81de3 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -108,8 +108,7 @@ if ! shopt -oq posix; then
 fi
 
 # source Guix shell config dirs, for vte.sh and bash completions
-GUIX_PROFILES=("${HOME}/.desktop-profile"
-               "${HOME}/.guix-profile"
+GUIX_PROFILES=("${HOME}/.guix-profile"
                "${HOME}/.config/guix/current")
 for profile in "${GUIX_PROFILES[@]}"; do
     for dir in "${profile}/etc/bash_completion.d" "${profile}/etc/profile.d"; do
diff --git a/.config/guix/manifest/chaman.scm b/.config/guix/manifest/chaman.scm
deleted file mode 100644 (file)
index edffa52..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-(specifications->manifest
-  '("alsa-utils"
-    "audacity"
-    "bash-completion"
-    "cvs"
-    "dunst"
-    "emacs"
-    "emacs-alert"
-    "emacs-async"
-    "emacs-biblio-git"
-    "emacs-boxquote"
-    "emacs-company"
-    "emacs-company-ebdb"
-    "emacs-crux"
-    "emacs-dash"
-    "emacs-debbugs"
-    "emacs-diff-hl"
-    "emacs-dmenu"
-    "emacs-doom-themes"
-    "emacs-ebdb"
-    "emacs-emmet-mode"
-    ;; "emacs-emojify"
-    "emacs-erc-hl-nicks"
-    "emacs-erc-scrolltoplace"
-    "emacs-eshell-up"
-    "emacs-exec-path-from-shell"
-    "emacs-expand-region"
-    "emacs-exwm"
-    "emacs-exwm-edit"
-    "emacs-flycheck"
-    "emacs-geiser"
-    ;; "emacs-gnus-harvest"
-    "emacs-guix"
-    "emacs-helpful"
-    "emacs-hl-todo"
-    "emacs-ivy"
-    "emacs-magit"
-    "emacs-message-x"
-    "emacs-minions"
-    ;; "emacs-multi-term"
-    "emacs-multiple-cursors"
-    "emacs-mwim"
-    "emacs-no-littering"
-    "emacs-org"
-    "emacs-org-contrib"
-    "emacs-org-ref"
-    "emacs-orgalist"
-    "emacs-page-break-lines"
-    "emacs-pass"
-    "emacs-pinentry"
-    "emacs-projectile"
-    "emacs-shrink-path-git"
-    "emacs-smart-mode-line"
-    "emacs-smex"
-    "emacs-typo"
-    "emacs-unkillable-scratch"
-    "emacs-use-package"
-    "emacs-web-mode"
-    "emacs-which-key"
-    "emacs-yasnippet"
-    "emacs-znc-git"
-    "font-adobe-source-code-pro"
-    "font-gnu-freefont-ttf"
-    "font-google-roboto"
-    "font-liberation"
-    "font-linuxlibertine"
-    "font-sil-gentium"
-    "font-tex-gyre"
-    ;; "font-ubuntu"
-    "getmail"
-    "gettext"
-    "gimp"
-    "git"
-    "git:send-email"
-    "gnupg"
-    "guile"
-    "haunt"
-    "htop"
-    "hunspell"
-    "hunspell-dict-en-ca"
-    "hunspell-dict-en-us"
-    "icecat"
-    "inkscape"
-    "isync"
-    "light"
-    "mpv"
-    "msmtp"
-    "ncdu"
-    "notmuch"
-    "openjdk"
-    "openssh"
-    "openssl"
-    "password-store"
-    "pinentry-emacs"
-    "poppler"                           ; for 'pdffonts'
-    "rofi"
-    "rofi-pass"
-    "rsync"
-    "rtv"
-    "rxvt-unicode"
-    "screen"
-    "setxkbmap"
-    ;; "texlive"
-    ;; "texlive-base"
-    "thinkfan"
-    "wget"
-    "xdg-user-dirs"
-    ;; "xkbcomp"
-    "xmodmap"
-    "xrdb"
-    "xset"
-    "xsetroot"
-    "youtube-dl"))
diff --git a/.config/guix/manifest/doc.scm b/.config/guix/manifest/doc.scm
new file mode 100644 (file)
index 0000000..b732864
--- /dev/null
@@ -0,0 +1,8 @@
+(specifications->manifest
+  '("libreoffice"
+    "texlive-amsfonts"
+    "texlive-base"
+    "texlive-latex-listings"
+    ;; "texlive-palatino"
+    "texlive-xcolor"
+))
diff --git a/.config/guix/manifest/main.scm b/.config/guix/manifest/main.scm
new file mode 100644 (file)
index 0000000..8917d27
--- /dev/null
@@ -0,0 +1,114 @@
+(specifications->manifest
+  '("alsa-utils"
+    "bash-completion"
+    "cpufrequtils"
+    "cpupower"
+    "cvs"
+    "dunst"
+    "emacs"
+    "emacs-alert"
+    "emacs-amx"
+    "emacs-async"
+    "emacs-biblio-git"
+    "emacs-boxquote"
+    "emacs-company"
+    "emacs-company-ebdb"
+    "emacs-crux"
+    "emacs-dash"
+    "emacs-debbugs"
+    "emacs-diff-hl"
+    "emacs-dmenu"
+    "emacs-doom-themes"
+    "emacs-ebdb"
+    "emacs-emmet-mode"
+    ;; "emacs-emojify"
+    "emacs-erc-hl-nicks"
+    "emacs-erc-scrolltoplace"
+    "emacs-eshell-up"
+    "emacs-exec-path-from-shell"
+    "emacs-expand-region"
+    "emacs-exwm"
+    "emacs-exwm-edit"
+    "emacs-flycheck"
+    "emacs-geiser"
+    ;; "emacs-gnus-harvest"
+    "emacs-guix"
+    "emacs-helpful"
+    "emacs-hl-todo"
+    "emacs-ivy"
+    "emacs-magit"
+    "emacs-message-x"
+    "emacs-minions"
+    ;; "emacs-multi-term"
+    "emacs-multiple-cursors"
+    "emacs-mwim"
+    ;; "emacs-next"
+    ;; "emacs-next-delight"
+    "emacs-no-littering"
+    "emacs-org"
+    "emacs-org-contrib"
+    "emacs-org-ref"
+    "emacs-orgalist"
+    "emacs-page-break-lines"
+    "emacs-pass"
+    "emacs-pinentry"
+    "emacs-projectile"
+    "emacs-shrink-path-git"
+    "emacs-smart-mode-line"
+    "emacs-typo"
+    "emacs-unkillable-scratch"
+    "emacs-use-package"
+    "emacs-web-mode"
+    "emacs-which-key"
+    "emacs-yasnippet"
+    "emacs-znc-git"
+    "font-adobe-source-code-pro"
+    "font-gnu-freefont-ttf"
+    "font-google-roboto"
+    "font-liberation"
+    "font-linuxlibertine"
+    "font-sil-gentium"
+    "font-tex-gyre"
+    ;; "font-ubuntu"
+    "font-vazir"
+    "getmail"
+    "gettext"
+    "git"
+    "git:send-email"
+    "gnupg"
+    "guile"
+    "haunt"
+    "htop"
+    "hunspell"
+    "hunspell-dict-en-ca"
+    "hunspell-dict-en-us"
+    "isync"
+    "light"
+    "msmtp"
+    "ncdu"
+    "notmuch"
+    "openjdk"
+    "openssh"
+    "openssl"
+    "pass-otp"
+    "password-store"
+    "pasystray"
+    "pinentry-emacs"
+    "poppler"                           ; for 'pdffonts'
+    "rofi"
+    "rofi-pass"
+    "rsync"
+    "rxvt-unicode"
+    "screen"
+    "scrot"
+    "setxkbmap"
+    "strace"
+    "thinkfan"
+    "unzip"
+    "wget"
+    "xdg-user-dirs"
+    ;; "xkbcomp"
+    "xmodmap"
+    "xrdb"
+    "xset"
+    "xsetroot"))
diff --git a/.config/guix/manifest/media.scm b/.config/guix/manifest/media.scm
new file mode 100644 (file)
index 0000000..f8ff541
--- /dev/null
@@ -0,0 +1,6 @@
+(specifications->manifest
+  '("audacity"
+    "gimp"
+    "inkscape"
+    "mpv"
+    "youtube-dl"))
diff --git a/.config/guix/manifest/web.scm b/.config/guix/manifest/web.scm
new file mode 100644 (file)
index 0000000..6e5fd34
--- /dev/null
@@ -0,0 +1,3 @@
+(specifications->manifest
+  '("icecat"
+    "rtv"))
index b419e55..7b287dc 100644 (file)
--- a/.profile
+++ b/.profile
@@ -20,6 +20,9 @@ fi
 export PATH
 export INFOPATH
 
+export MY_GUIX_MANIFESTS="$HOME/.config/guix/manifest"
+export MY_GUIX_PROFILES="$HOME/.config/guix/profile"
+
 export XDG_CONFIG_HOME="$HOME/.config"
 export XDG_DATA_HOME="$HOME/.local/share"
 
@@ -60,6 +63,15 @@ if [ -z "$IS_GUIX_SYSTEM" ]; then
     fi
 fi
 
+for p in $MY_GUIX_PROFILES/*; do
+    profile=$p/$(basename "$p")
+    if [ -f "$profile"/etc/profile ]; then
+        GUIX_PROFILE="$profile"
+        . "$GUIX_PROFILE"/etc/profile
+    fi
+    unset profile
+done
+
 # start an ssh-agent (with guix's openssh)
 if [ -z "$IS_GUIX_SYSTEM" ]; then
     if ! pgrep -u "$USER" ssh-agent > /dev/null; then