From b57df3d874955ba705b4836d1b9ccf8d6d885f42 Mon Sep 17 00:00:00 2001 From: Robby Zambito Date: Sun, 8 Mar 2026 18:55:07 -0400 Subject: podman, bat, and shell init changes --- home.bash_profile | 9 +++++---- home.bashrc | 43 ---------------------------------------- home.scm | 59 +++++++++++++++++++++++++++++++++++++------------------ system.scm | 48 +++++++++++++++++--------------------------- 4 files changed, 63 insertions(+), 96 deletions(-) diff --git a/home.bash_profile b/home.bash_profile index 0b8c92d..947876c 100644 --- a/home.bash_profile +++ b/home.bash_profile @@ -1,8 +1,8 @@ -# Set up Guix Home profile -if [ -f ~/.profile ]; then . ~/.profile; fi +# # Set up Guix Home profile +# if [ -f ~/.profile ]; then . ~/.profile; fi -# Honor per-interactive-shell startup file -if [ -f ~/.bashrc ]; then . ~/.bashrc; fi +# # Honor per-interactive-shell startup file +# if [ -f ~/.bashrc ]; then . ~/.bashrc; fi # Merge search-paths from multiple profiles, the order matters. eval "$(guix package --search-paths \ @@ -15,3 +15,4 @@ eval "$(guix package --search-paths \ export PATH=/run/setuid-programs:$PATH # User specific environment and startup programs + diff --git a/home.bashrc b/home.bashrc index 1ab25a0..09703c9 100644 --- a/home.bashrc +++ b/home.bashrc @@ -1,46 +1,3 @@ -# Bash initialization for interactive non-login shells and -# for remote shells (info "(bash) Bash Startup Files"). - -# Export 'SHELL' to child processes. Programs such as 'screen' -# honor it and otherwise use /bin/sh. -export SHELL - -if [[ $- != *i* ]] -then - # We are being invoked from a non-interactive shell. If this - # is an SSH session (as in "ssh host command"), source - # /etc/profile so we get PATH and other essential variables. - [[ -n "$SSH_CLIENT" ]] && source /etc/profile - - # Don't do anything else. - return -fi - -# Source the system-wide file. -source /etc/bashrc - -# Adjust the prompt depending on whether we're in 'guix environment'. -if [ -n "$GUIX_ENVIRONMENT" ] -then - PS1='\u@\h \w [env]\$ ' -else - PS1='\u@\h \w\$ ' -fi -alias ls='ls -p --color=auto' -alias ll='ls -l' -alias grep='grep --color=auto' -alias ip='ip -color=auto' -alias kubectl="minikube kubectl --" -alias duckdb='env LD_LIBRARY_PATH=/home/robby/.guix-profile/lib:$LD_LIBRARY_PATH $HOME/.local/bin/duckdb' - -export BUN_INSTALL="$HOME/.bun" -export PATH=$BUN_INSTALL/bin:$PATH -export PATH=/home/robby/go/bin:$PATH -export PATH=/home/robby/.local/bin:/home/robby/.cargo/bin:/home/robby/.vnode/bin:$PATH source <(jj util completion bash) -source <(nsc completion bash) -source $HOME/.config/user-dirs.dirs - -alias nats='LD_LIBRARY_PATH="/gnu/store/9p1z62lff9czkr95n3sal97rjw5lm7wl-gcc-toolchain-14.2.0/lib:$LD_LIBRARY_PATH" nats' eval "$(zoxide init bash)" diff --git a/home.scm b/home.scm index 7f49514..bfd5fe2 100644 --- a/home.scm +++ b/home.scm @@ -520,18 +520,11 @@ visit otherwise." ("url \"rad://\"" ("insteadOf" . "https://rad.go/"))))))) -(define guix-gaming-config (cdr (assq 'guix-gaming-config secrets))) +(define bat-config + (string-append "--theme=Nord\n" + "--pager=\"less -R -F -X\"")) -(define rz/user-dirs - (string-append "XDG_DESKTOP_DIR=\"$HOME/desktop\"\n" - "XDG_DOWNLOAD_DIR=\"$HOME/downloads\"\n" - "XDG_TEMPLATES_DIR=\"$HOME/templates\"\n" - "XDG_PUBLICSHARE_DIR=\"$HOME/public\"\n" - "XDG_DOCUMENTS_DIR=\"$HOME/documents\"\n" - "XDG_MUSIC_DIR=\"$HOME/music\"\n" - "XDG_PICTURES_DIR=\"$HOME/pictures\"\n" - "XDG_VIDEOS_DIR=\"$HOME/videos\"\n" - "XDG_DATA_DIRS=\"/var/lib/flatpak/exports/share:$XDG_DATA_HOME/flatpak/exports/share:$XDG_DATA_DIRS\"\n")) +(define guix-gaming-config (cdr (assq 'guix-gaming-config secrets))) (define log-dir (or (getenv "XDG_LOG_HOME") "/home/robby/.local/var/log")) @@ -579,7 +572,22 @@ visit otherwise." ("poweroff" . "loginctl poweroff") ("hibernate" . "loginctl hibernate") ("p1" . "ping 1.1.1.1") - ("p8" . "ping 8.8.8.8"))) + ("p8" . "ping 8.8.8.8") + ("e" . "emacsclient -r -n") + ("kubectl" . "minikube kubectl --") + ("duckdb" . "env LD_LIBRARY_PATH=/home/robby/.guix-profile/lib:$LD_LIBRARY_PATH $HOME/.local/bin/duckdb") + ("nats" . "LD_LIBRARY_PATH=\"/gnu/store/9p1z62lff9czkr95n3sal97rjw5lm7wl-gcc-toolchain-14.2.0/lib:$LD_LIBRARY_PATH\" nats") + ("sway" . "XDG_CURRENT_DESKTOP=sway dbus-run-session sway"))) + (environment-variables + '(("BUN_INSTALL" . "$HOME/.bun") + ("PATH" . "$BUN_INSTALL/bin:$PATH") + ("PATH" . "$HOME/go/bin:$PATH") + ("PATH" . "$HOME/.local/bin:$PATH") + ("PATH" . "$HOME/.cargo/bin:$PATH") + ("PATH" . "$HOME/.vnode/bin:$PATH") + ("PODMAN_COMPOSE_WARNING_LOGS" . "false") + ("BROWSER" . "xdg-open") + ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:/home/robby/.local/share/flatpak/exports/share"))) (bashrc (list (local-file "home.bashrc" "bashrc"))) (bash-profile (list (local-file @@ -587,12 +595,12 @@ visit otherwise." "bash_profile"))))) (service home-dbus-service-type) (service home-xdg-configuration-files-service-type - `(("user-dirs.dirs" ,(plain-file "user-dirs" rz/user-dirs)) - ;; ("sway/config" ,(plain-file "sway-config" rz/sway-config)) + `(;; ("sway/config" ,(plain-file "sway-config" rz/sway-config)) ("emacs/init.el" ,(plain-file "init.el" emacs-config)) ("foot/foot.ini" ,(plain-file "foot.ini" foot-config)) ("wofi/config" ,(computed-file "wofi-config" wofi-config)) ("git/config" ,(plain-file "git-config" git-config)) + ("bat/config" ,(plain-file "bat-config" bat-config)) ("guix-gaming-channels/games.scm" ,(plain-file "guix-gaming-config" guix-gaming-config)))) (service home-files-service-type `((".mbsyncrc" ,(local-file "mbsyncrc")) @@ -652,11 +660,24 @@ visit otherwise." (respawn? #t)))))) (service home-pipewire-service-type) (simple-service 'some-useful-env-vars-service - home-environment-variables-service-type - `(("LESSHISTFILE" . "$XDG_CACHE_HOME/.lesshst") - ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:/home/robby/.local/share/flatpak/exports/share") - ("EDITOR" . "emacsclient -n -a emacs") - ("EMACSLOADPATH" . "$HOME/.guix-home/profile/share/emacs/site-lisp/"))) + home-environment-variables-service-type + `(("LESSHISTFILE" . "$XDG_CACHE_HOME/.lesshst") + ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:/home/robby/.local/share/flatpak/exports/share") + ("EDITOR" . "emacsclient -n -a emacs") + ("EMACSLOADPATH" . "$HOME/.guix-home/profile/share/emacs/site-lisp/") + ("XDG_DESKTOP_DIR" . "$HOME/desktop") + ("XDG_DOWNLOAD_DIR" . "$HOME/downloads") + ("XDG_TEMPLATES_DIR" . "$HOME/templates") + ("XDG_PUBLICSHARE_DIR" . "$HOME/public") + ("XDG_DOCUMENTS_DIR" . "$HOME/documents") + ("XDG_MUSIC_DIR" . "$HOME/music") + ("XDG_PICTURES_DIR" . "$HOME/pictures") + ("XDG_VIDEOS_DIR" . "$HOME/videos") + ("BROWSER" . "xdg-open") + ("PODMAN_COMPOSE_WARNING_LOGS" . "false") + ;; Required to open links in Firefox with DBUS instead of X11 sockets + ("MOZ_DBUS_REMOTE" . "1") + ("MOZ_ENABLE_WAYLAND" . "1"))) (service home-openssh-service-type (home-openssh-configuration (hosts diff --git a/system.scm b/system.scm index f18e432..5045138 100644 --- a/system.scm +++ b/system.scm @@ -11,6 +11,7 @@ ;; used in this configuration. (use-modules (gnu) (gnu packages package-management) ; guix-for-channels + (gnu system accounts);for 'subid-range' (gnu system setuid)) (use-service-modules avahi @@ -40,35 +41,15 @@ (import (srfi 1) (guix channels) - (guix inferior)) + (guix inferior) + (guix packages)) -(define-values (rz/linux rz/linux-libre-headers rz/linux-kernel-modules) - (let* ((channels - (list (channel - (name 'nonguix) - (url "https://gitlab.com/nonguix/nonguix") - (commit "440720b7b2ca4789298f3150bc82bf1b5ed4b8c9") - (introduction - (make-channel-introduction - "897c1a470da759236cc11798f4e0a5f7d4d59fbc" - (openpgp-fingerprint - "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) - (channel - (name 'guix) - (url "https://codeberg.org/guix/guix.git") - (commit "d37b467631d5b0e965ea933b8bda8448993580e9") - (introduction - (make-channel-introduction - "9edb3f66fd807b096b48283debdcddccfea34bad" - (openpgp-fingerprint - "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))) - (inferior (inferior-for-channels channels)) - (kernel-version "6.2.2")) - (values (specification->package "linux") - (first (lookup-inferior-packages inferior "linux-libre-headers")) - ;; TODO FIX - (list (specification->package "v4l2loopback-linux-module") - )))) +(define-values (rz/linux + rz/linux-libre-headers + rz/linux-kernel-modules) + (values linux + (specification->package "linux-libre-headers") + (list (specification->package "v4l2loopback-linux-module")))) ;; TODO FIX ;; (define dslr-webcam-config @@ -102,7 +83,8 @@ (comment "Robby Zambito") (group "users") (home-directory "/home/robby") - (supplementary-groups '("wheel" + (supplementary-groups '("cgroup" + "wheel" "netdev" "audio" "video" @@ -131,6 +113,7 @@ "ntfs-3g" "pipewire" ;; "purple-mattermost" + "podman-compose" "ripgrep" ;; TODO fix ;; "rocm-cmake" @@ -180,7 +163,12 @@ (service dbus-root-service-type) ;; (service containerd-service-type) ;; (service docker-service-type) - (service rootless-podman-service-type) + (service rootless-podman-service-type + (rootless-podman-configuration + (subgids + (list (subid-range (name "robby")))) + (subuids + (list (subid-range (name "robby")))))) (service elogind-service-type) ;; (service sddm-service-type ;; (sddm-configuration -- cgit