From 8f604ce0a96e9d74a44cc49282ce3ba90b9c8ce3 Mon Sep 17 00:00:00 2001 From: Steve Ayerhart Date: Sun, 16 Aug 2020 12:31:18 -0400 Subject: [PATCH] more configs --- bash/README.org | 69 ++++++++++++++++++++++ guix/README.org | 14 +++++ guix/cuirass-specs.scm | 20 +++++++ guix/guixbook-pro.scm | 26 ++++++++- spacemacs/README.org | 129 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 256 insertions(+), 2 deletions(-) create mode 100644 bash/README.org create mode 100644 guix/README.org create mode 100644 guix/cuirass-specs.scm create mode 100644 spacemacs/README.org diff --git a/bash/README.org b/bash/README.org new file mode 100644 index 0000000..0778b56 --- /dev/null +++ b/bash/README.org @@ -0,0 +1,69 @@ +#+TITLE: Bash Config +#+PROPERTY: header-args+ :mkdir p yes +#+PROPERTY: header-args+ :tangle ~/.bashrc + +Export =SHELL= to child processes. Programs such as ~screen~ +honor it and otherwise use ~/bin/bash~ +#+begin_src bash + export SHELL +#+end_src + +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. +#+begin_src bash + if [[ $- != *i* ]] + then + [[ -n "$SSH_CLIENT" ]] && source /etc/profile + + return + fi +#+end_src + +Make sure we have the system-wide config. +#+begin_src bash + source /etc/bashrc +#+end_src + +Adjust the prompt depending on wheather we're in a [[https://guix.gnu.org/manual/en/html_node/Invoking-guix-environment.html][guix environment]]. +#+begin_src bash + if [ -n "$GUIX_ENVIRONMENT" ] + then + PS1='\u@\h \w [env]\$ ' + else + PS1='\u@\h \w\$ ' + fi +#+end_src + +* History + By default, Bash write its history at the end of each session, overwriting the existing file with an updated version. + This means if multiple bash session are open, only the last one to exit will have its history saved. + #+begin_src bash + shopt -s histappend + #+end_src + + Most of the time the following commands just clutter up history or obscures usefull entries. Ignore the following commands + #+begin_src bash + export HISTIGNORE='exit:ls:ll:cd:pwd:bg:fg:history' + #+end_src + +* Aliases + #+begin_src bash + alias ls='ls -p --color=auto' + alias ll='ls -l' + alias grep='grep --color=auto' + #+end_src + +* Variables + #+begin_src bash + export BROWSER=vimb + + #+end_src + Guix + #+begin_src bash + export GUIX_PROFILE="$HOME/.guix-profile" + export GUIX_PACKAGE_PATH="$HOME/Source/bbbsd" + export GUILE_LOAD_PATH="$HOME/.guix-profile/share/guile/site/2.2${GUILE_LOAD_PATH:+:}${GUILE_LOAD_PATH}" + export GUILE_LOAD_COMPILED_PATH="$HOME/.guix-profile/share/guile/site/2.2/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}${GUILE_LOAD_COMPILED_PATH}" + export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" + #+end_src diff --git a/guix/README.org b/guix/README.org new file mode 100644 index 0000000..a0034f7 --- /dev/null +++ b/guix/README.org @@ -0,0 +1,14 @@ +#+TITLE: Guix Configurations + +* Channels + :PROPERTIES: + :header-args+ :mkdir p yes + :header-args+ :tangle ~/.config/guix/channels.scm + :END: + #+begin_src scheme + (cons (channel + (name 'guix-hpc) + (url "https://gitlab.inria.fr/guix-hpc/guix-hpc.git") + (branch "master")) + %default-channels) + #+end_src diff --git a/guix/cuirass-specs.scm b/guix/cuirass-specs.scm new file mode 100644 index 0000000..97471da --- /dev/null +++ b/guix/cuirass-specs.scm @@ -0,0 +1,20 @@ +(list + '((#:name . "bbbsd") + (#:load-path-inputs . ("guix")) + (#:package-path-inputs . "bbbsd") + (#:proc-input . "guix") + (#:proc-file . "build-aux/cuirass/gnu-system.scm") + (#:proc . cuirass-jobs) + (#:proc-args . ((subset . "manifests") + (systems . "x86_64-linux") + (manifests . (("config" . "guix/manifest.scm"))))) + (#:inputs . (((#:name . "guix") + (#:url . "git://git.savannah.gnu.org/guix.git") + (#:load-path . ".") + (#:branch . "master") + (#:no-compile? . #t)) + ((#:name . "bbbsd") + (#:url . "https://git.bonerbonerboner.com/boner-boner-boner/bbbsd.git") + (#:load-path . ".") + (#:branch . "master") + (#:no-compile? . #t)))))) diff --git a/guix/guixbook-pro.scm b/guix/guixbook-pro.scm index bb0b369..3c5a7cc 100644 --- a/guix/guixbook-pro.scm +++ b/guix/guixbook-pro.scm @@ -7,14 +7,36 @@ (use-service-modules desktop xorg avahi dbus sound networking pm sddm ssh security-token ) (use-package-modules bootloaders certs suckless wm gnome libusb ssh - version-control + version-control xdisorg xorg pulseaudio ssh web curl sqlite nss wget curl file linux bash) +(define %cuirass-specs + #~(list + '((#:name . "bbbsd") + (#:load-path-inputs . ("guix")) + (#:package-path-inputs . "bbbsd") + (#:proc-input . "guix") + (#:proc-file . "build-aux/cuirass/gnu-system.scm") + (#:proc . cuirass-jobs) + (#:proc-args . ((subset . "manifests") + (systems . "x86_64-linux") + (manifests . (("config" . "guix/manifest.scm"))))) + (#:inputs . (((#:name . "guix") + (#:url . "git://git.savannah.gnu.org/guix.git") + (#:load-path . ".") + (#:branch . "master") + (#:no-compile? . #t)) + ((#:name . "bbbsd") + (#:url . "https://git.bonerbonerboner.com/boner-boner-boner/bbbsd.git") + (#:load-path . ".") + (#:branch . "master") + (#:no-compile? . #t))))))) + (define %guixbook-packages (cons* sway swaylock dmenu glibc-utf8-locales - pulseaudio + pulseaudio git gvfs sqlite diff --git a/spacemacs/README.org b/spacemacs/README.org new file mode 100644 index 0000000..ee2d1f2 --- /dev/null +++ b/spacemacs/README.org @@ -0,0 +1,129 @@ +#+TITLE: Spacemacs +#+PROPERTY: header-args+ :mkdir p yes +#+PROPERTY: header-args+ :tangle ~/.spacemacs + +* Initialization + This function is called at the very startup of spacemacs initialization before layers + configuration. Youshould not put any user code in there besides modifying the variables values + #+begin_src elisp + (defun dotspacemacs/init () + (setq-default + dotspacemacs-elpa-https t + dotspacemacs-elpa-timeout 5 + dotspacemacs-check-for-update nil + dotspacemacs-elpa-subdirectory nil + dotspacemacs-editing-style 'vim + dotspacemacs-verbose-loading nil + dotspacemacs-startup-banner nil + dotspacemacs-startup-lists '((recents . 5) + (projects . 7)) + dotspacemacs-startup-buffer-responsive t + dotspacemacs-scratch-mode 'text-mode + dotspacemacs-themes '(doom-spacegrey + mustang + majapahit-dark + phoenix-dark-mono + zen-and-art + spacemacs-dark + spacemacs-light) + dotspacemacs-colorize-cursor-according-to-state t + dotspacemacs-default-font '("Fira Mono" + :size 12 + :weight normal + :width normal) + dotspacemacs-leader-key "SPC" + dotspacemacs-emacs-command-key "SPC" + dotspacemacs-ex-command-key ":" + dotspacemacs-emacs-leader-key "M-m" + dotspacemacs-major-mode-leader-key "," + dotspacemacs-major-mode-emacs-leader-key "C-M-m" + dotspacemacs-distinguish-gui-tab nil + dotspacemacs-remap-Y-to-y$ nil + dotspacemacs-retain-visual-state-on-shift t + dotspacemacs-visual-line-move-text nil + dotspacemacs-ex-substitute-global nil + dotspacemacs-default-layout-name "Default" + dotspacemacs-display-default-layout nil + dotspacemacs-auto-resume-layouts nil + dotspacemacs-large-file-size 1 + dotspacemacs-auto-save-file-location 'cache + dotspacemacs-max-rollback-slots 5 + dotspacemacs-enable-paste-transient-state nil + dotspacemacs-which-key-delay 0.4 + dotspacemacs-which-key-position 'bottom + dotspacemacs-loading-progress-bar t + dotspacemacs-fullscreen-at-startup nil + dotspacemacs-fullscreen-use-non-native nil + dotspacemacs-maximized-at-startup nil + dotspacemacs-active-transparency 90 + dotspacemacs-inactive-transparency 90 + dotspacemacs-show-transient-state-title t + dotspacemacs-show-transient-state-color-guide t + dotspacemacs-mode-line-unicode-symbols t + dotspacemacs-mode-line-theme '(all-the-icons :separator none) + dotspacemacs-smooth-scrolling t + dotspacemacs-line-numbers 'relative + dotspacemacs-folding-method 'evil + dotspacemacs-smartparens-strict-mode nil + dotspacemacs-smart-closing-parenthesis nil + dotspacemacs-highlight-delimiters `any + dotspacemacs-persistent-server nil + dotspacemacs-search-tools '("ag" "pt" "ack" "grep") + dotspacemacs-default-package-repository nil + dotspacemacs-whitespace-cleanup `all + )) + #+end_src + +* Layers + Layers declarations. You should not put any user code in this function besides + modifying the variable values. + TODO: add code to make this more literate + #+begin_src elisp + (defun dotspacemacs/layers () + (setq-default + dotspacemacs-distribution 'spacemacs + dotspacemacs-enable-lazy-installation 'unused + dotspacemacs-ask-for-lazy-installation t + dotspacemacs-configuration-layer-path '() + dotspacemacs-configuration-layers + '( + (helm :variables + helm-enable-auto-resize t + helm-no-header t) + (treemacs :variables + treemacs-use-follow-mode 'tag + treemacs-use-file-watch-mode t + treemacs-use-git-mode 'deferred) + unicode-fonts + gpu + ;lsp + sql + html + javascript + json + factor + emacs-lisp + c-c++ + racket + scheme + pdf + shell-scripts + yaml + better-defaults + emacs-lisp + (git :variables + git-magit-status-fullscreen t) + github + themes-megapack + markdown + org + (shell :variables + shell-default-shell 'eshell + shell-default-height 30 + shell-default-position 'bottom) + ) + dotspacemacs-additional-packages '(vala-mode) + dotspacemacs-frozen-packages '() + dotspacemacs-excluded-packages '() + dotspacemacs-install-packages 'used-only)) + #+end_src