;; This "home-environment" file can be passed to 'guix home reconfigure' ;; to reproduce the content of your profile. This is "symbolic": it only ;; specifies package names. To reproduce the exact same profile, you also ;; need to capture the channels being used, as returned by "guix describe". ;; See the "Replicating Guix" section in the manual. ;;; Good reference ;;; https://git.sr.ht/~efraim/guix-config/tree/9009e110e16a8f153add7fb4d7f1512f6a543802/item/efraim-home.scm (install-r7rs!) (add-to-load-path (dirname (current-filename))) (import (gnu home) (gnu home services) (gnu home services desktop) (gnu home services guix) (gnu home services shells) (gnu home services shepherd) (gnu home services sound) (gnu home services ssh) (gnu home services sway) (gnu home services symlink-manager) (gnu packages) (gnu services) ;(gnu services syncthing) (guix packages) (gnu packages music) (gnu packages guile-xyz) (guix channels) (guix derivations) (guix monads) (guix modules) (guix store) (guix gexp) (guix transformations) (srfi 1) (config-generation sexp) (rename (config packages) (home home-packages)) (rename (config sway) (sway-config rz/sway-config)) (config foot) (rename (config emacs) (emacs-config rz/emacs-config)) (ini)) (define secrets (load "secrets.scm")) (define rz/terminal-emulator "foot") ;; (load "./gptel.scm") (define wofi-config (with-extensions (list guile-ini guile-smc guile-lib) #~(begin (import (ini)) (with-output-to-file #$output (lambda () (scm->ini '((#f ("stylesheet" . #$(local-file "wofi/style.css")) ("xoffset" . 0) ("yoffset" . 0) ("hide_scroll" . "true") ("show" . "drun") ("width" . "600px") ("lines" . 10) ("line_wrap" . "word") ("term" . #$rz/terminal-emulator) ("allow_markup" . "true") ("always_parse_args" . "true") ("show_all" . "true") ("print_command" . "true") ("layer" . "overlay") ("allow_images" . "true") ("insensitivity" . "true") ("prompt" . "Hey, you should type something!") ("image_size" . 25) ("display_generic" . "true") ("key_expand" . "Tab"))))))))) (define git-config (with-output-to-string (lambda () (scm->ini `((init ("defaultBranch" . "master")) (core ("editor" . "emacsclient -c")) (user ("email" . "contact@robbyzambito.me") ("name" . "Robby Zambito")) ;; see push.autoSetupRemote in git help config (push ("autoSetupRemote" . "true")) ("url \"rad://\"" ("insteadOf" . "https://rad.go/"))))))) (define bat-config (string-append "--theme=Nord\n" "--pager=\"less -R -F -X\"")) (define guix-gaming-config (cdr (assq 'guix-gaming-config secrets))) (define log-dir (or (getenv "XDG_LOG_HOME") "/home/robby/.local/var/log")) (define (generate-openssh-hosts num-vces num-vms-per-vce) ;; Generate all VCE numbers from 1 to num-vces (let ((vce-numbers (iota num-vces 1)) (vm-numbers (iota num-vms-per-vce 1))) ;; For each VCE, generate configurations for all VMs (append-map (lambda (vce-num) ;; For each VM number, create a configuration (map (lambda (vm-num) (openssh-host (name (string-append "rt-vce" (number->string vce-num) "-kali" (number->string vm-num))) (user "redteam") (host-name (string-append "172.18.6." (number->string (+ 60 vm-num)))) (identity-file "/home/robby/.ssh/redteam_key") (proxy (list (proxy-jump (host-name (string-append "vce" (number->string vce-num)))))) (extra-content (string-append " DynamicForward 8888\n" " StrictHostKeyChecking no\n" " UserKnownHostsFile=/dev/null")))) vm-numbers)) vce-numbers))) (define redteam-kali-vms (generate-openssh-hosts 2 10)) (home-environment ;; Below is the list of packages that will show up in your ;; Home profile, under ~/.guix-home/profile. (packages home-packages) ;; Below is the list of Home services. To search for available ;; services, run 'guix home search KEYWORD' in a terminal. (services (list (service home-bash-service-type (home-bash-configuration (aliases '(("grep" . "grep --color=auto") ("ll" . "ls -l") ("ls" . "ls -p --color=auto") ("cp" . "cp --preserve=timestamps") ("reboot" . "loginctl reboot") ("poweroff" . "loginctl poweroff") ("hibernate" . "loginctl hibernate") ("p1" . "ping 1.1.1.1") ("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 "home.bash_profile" "bash_profile"))))) (service home-dbus-service-type) (service home-xdg-configuration-files-service-type `(;; ("sway/config" ,(plain-file "sway-config" rz/sway-config)) ("emacs/init.el" ,(plain-file "init.el" rz/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")) (".nmprc" ,(plain-file "npmrc" "prefix=/home/robby/.vnode")))) (service home-sway-service-type (sway-configuration (variables (append %sway-default-variables `((menu . "wofi -c ~/.config/wofi/config -I")))) (extra-content (list rz/sway-config)))) (service home-shepherd-service-type (home-shepherd-configuration (services (list ;; (shepherd-service ;; (documentation "SwayWM") ;; (provision '(sway)) ;; (requirement '(dbus)) ;; (respawn? #f) ;; (auto-start? #f) ;; (start #~(make-forkexec-constructor ;; (list #$(file-append (specification->package "dbus") "/bin/dbus-run-session") "sway") ;; #:log-file (string-append #$log-dir "/swaywm.log"))) ;; (stop #~(make-system-destructor ;; (string-join (list #$(file-append (specification->package "sway") "/bin/swaymsg") ;; "exit"))))) (shepherd-service (documentation "Emacs Server") (provision '(emacs)) (start #~(make-system-constructor "emacs --daemon")) (stop #~(make-system-destructor "emacsclient --eval \"(kill-emacs)\""))) ;(shepherd-service ;(documentation "Run `syncthing' without calling the browser") ;(provision '(syncthing)) ;(start #~(make-forkexec-constructor ;(list #$(file-append (specification->package "syncthing") "/bin/syncthing") ;"-no-browser") ;#:log-file (string-append #$log-dir "/syncthing.log"))) ;(stop #~(make-kill-destructor)) ;(respawn? #t)) (shepherd-service (documentation "Run a Radicle node") (provision '(rad)) (start #~(make-forkexec-constructor (list "/home/robby/.cargo/bin/rad" "node" "start" "--path" "/home/robby/.cargo/bin/radicle-node" "--foreground") #:log-file (string-append #$log-dir "/rad-node.log"))) (stop #~(make-system-destructor "/home/robby/.cargo/bin/rad node stop")) (respawn? #t)) (shepherd-service (documentation "Run the Radicle web API") (provision '(rad-web)) (start #~(make-forkexec-constructor (list "/home/robby/.cargo/bin/rad-web" "--no-open") #:log-file (string-append #$log-dir "/rad-web.log"))) (stop #~(make-kill-destructor)) (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/") ("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 (append (list (openssh-host (name "not-a-pi") (host-name "10.69.0.1")) (openssh-host (name "zoinks") (host-name "zoinks.one")) (openssh-host (name "lowell-makes") (host-name "96.81.79.90") (port 1122)) (openssh-host (name "lowell-makes-cameo2") (host-name "cameo2") (port 22) (proxy (list (proxy-jump (host-name "lowell-makes"))))) (openssh-host (name "lowell-makes-cameo") (host-name "cameo") (port 22) (proxy (list (proxy-jump (host-name "lowell-makes"))))) (openssh-host (name "lowell-makes-mogan") (host-name "mogan") (port 22) (proxy (list (proxy-jump (host-name "lowell-makes"))))) (openssh-host (name "bustelo") (host-name "10.5.10.187") (port 22) (proxy (list (proxy-jump (host-name "lowell-makes"))))) (openssh-host (name "moja") (host-name "45.77.97.44")) (openssh-host (name "babel") (host-name "10.80.80.162")) (openssh-host (name "alpha.apex") (host-name "149.28.47.99")) (openssh-host (name "cnyhackathon-jump") (host-name "vce.cnyhackathon.org") (user "rz") (port 2210) (extra-content (string-append " DynamicForward 8888\n"))) (openssh-host (name "kali") (user "redteam") (host-name (string-append "172.18.6." (number->string (+ 60 7)))) (identity-file "/home/robby/.ssh/redteam_key") (proxy (list (proxy-jump (host-name "cnyhackathon-jump")))) (extra-content (string-append " DynamicForward 8888\n" " StrictHostKeyChecking no\n" " UserKnownHostsFile=/dev/null"))) (openssh-host (name "vce1") (host-name "vce1.ncaecybergames.org") (user "rz") (port 2210) (extra-content (string-append " DynamicForward 8888\n"))) (openssh-host (name "vce2") (host-name "vce2.ncaecybergames.org") (user "rz") (port 2210) (extra-content (string-append " DynamicForward 8888\n")))) redteam-kali-vms)) (authorized-keys (cdr (assq 'ssh-authorized-keys secrets))))) ;; (simple-service 'variant-packages-service ;; home-channels-service-type ;; (cons* ;; ;; (channel ;; ;; (name 'nonguix) ;; ;; (url "https://git.robbyzambito.me/mirror/nonguix.git") ;; ;; (branch "steam-no-pulse")) ;; (channel ;; (name 'nonguix) ;; (url "https://gitlab.com/nonguix/nonguix") ;; ;; Enable signature verification: ;; (introduction ;; (make-channel-introduction ;; "897c1a470da759236cc11798f4e0a5f7d4d59fbc" ;; (openpgp-fingerprint ;; "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) ;; (channel ;; (name 'guix-gaming-games) ;; (url "https://gitlab.com/guix-gaming-channels/games.git") ;; ;; Enable signature verification: ;; (introduction ;; (make-channel-introduction ;; "c23d64f1b8cc086659f8781b27ab6c7314c5cca5" ;; (openpgp-fingerprint ;; "50F3 3E2E 5B0C 3D90 0424 ABE8 9BDC F497 A4BB CC7F")))) ;; (channel ;; (name 'guix) ;; (url "https://codeberg.org/guix/guix.git") ;; (branch "master")) ;; ;; (channel ;; ;; (name 'guix) ;; ;; (url "https://codeberg.org/guix/guix.git") ;; ;; (branch "master") ;; ;; (introduction ;; ;; (make-channel-introduction ;; ;; "9edb3f66fd807b096b48283debdcddccfea34bad" ;; ;; (openpgp-fingerprint ;; ;; "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))) ;; '() ;; ;; %default-channels ;; )) )))