From bcc4d331084d3f6287599e42269719b082bbdf60 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Sun, 14 Jan 2024 11:17:11 +0100 Subject: Reintegrate Guix Home --- emacs.el | 63 +++++------------- home-configuration.scm | 175 ++++++++++++++++--------------------------------- 2 files changed, 74 insertions(+), 164 deletions(-) diff --git a/emacs.el b/emacs.el index eb58dab..562cf00 100644 --- a/emacs.el +++ b/emacs.el @@ -1,13 +1,5 @@ ;;; Disable auto-backup -(setq-default make-backup-files - nil) - -;;; Enable MELPA repository -(require 'package) -(add-to-list 'package-archives - '("melpa" . "https://melpa.org/packages/") - t) -(package-initialize) +(setq-default make-backup-files nil) ;;; https://github.com/fimblo/dot.emacs ;;; Theme Activation @@ -15,52 +7,29 @@ ;;; https://elpa.gnu.org/packages/aggressive-indent.html ;;; Automatic Activation of Aggressive Indent -(setq-default global-aggressive-indent-mode - 1) - -;;; https://jeko.frama.io/en/emacs.html -;;; Jeko's suggested configuration +(global-aggressive-indent-mode) ;; Highlight the pair of delimiters under the cursor -(setq-default - show-paren-mode 1 - show-paren-delay 0) - -;; Edit several strings of characters in the same way simultaneously -(require 'iedit) - -;; Edit several places in the file in the same way simultaneously -;; (require 'multiple-cursors) -;; (global-set-key (kbd "C-S-c C-S-c") -;; 'mc/edit-lines) -;; (global-set-key (kbd "C->") -;; 'mc/mark-next-like-this) -;; (global-set-key (kbd "C-<") -;; 'mc/mark-previous-like-this) -;; (global-set-key (kbd "C-c C-<") -;; 'mc/mark-all-like-this) +(setq-default show-paren-mode 1 + show-paren-delay 0) ;;; https://guix.gnu.org/manual/en/html_node/The-Perfect-Setup.html ;;; Copyright Information -(setq-default - user-full-name "Marek Paśnikowski" - user-mail-address "marekpasnikowski@protonmail.com") +(setq-default user-full-name "Marek Paśnikowski" + user-mail-address "marekpasnikowski@protonmail.com") ;;; Startup Screen Inhibition -(setq-default inhibit-startup-screen - t) +(setq-default inhibit-startup-screen t) ;; Enable the column-80 line -(setq-default - global-display-fill-column-indicator-mode 1 - display-fill-column-indicator-column 79) +(setq-default display-fill-column-indicator 1 + display-fill-column-indicator-column 79) +(global-display-fill-column-indicator-mode) ;; Prepare Literate Programming -(setq-default - org-confirm-babel-evaluate nil - org-src-fontify-natively t - org-src-tab-acts-natively t) -(org-babel-do-load-languages 'org-babel-load-languages - '((emacs-lisp . t) - (scheme . t ) - (shell . t ))) +(setq-default org-confirm-babel-evaluate nil + org-src-fontify-natively t + org-src-tab-acts-natively t) +(org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) + (scheme . t ) + (shell . t ))) diff --git a/home-configuration.scm b/home-configuration.scm index 5f98cf6..6752968 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -6,53 +6,12 @@ #:use-module (gnu services) #:use-module (guix gexp)) -(define list-to-package-output - (compose list - specification->package+output)) - -(define home-packages - '("cpupower" - "dconf-editor" - "emacs" - "emacs-aggressive-indent" - "emacs-guix" - "emacs-iedit" - "emacs-multiple-cursors" - "font-google-noto" - "git" - "git-lfs" - "gnome-shell-extension-forge" - "gnome-tweaks" - "gnupg" - "guile" - "guile-spec" - "icecat" - "icedove" - "jami" - "libreoffice" - "newsboat" - "pwgen" - "seahorse" - "sicp" - "trezor-agent" - "unzip" - "zip")) - -(define packages - (map list-to-package-output - home-packages)) +(define allow-downgrades + "--allow-downgrades ") (define config-prefix "/home/marek/src/guix-config/") -(define home-env-vars - '(("EDITOR" . "emacs") - ("NVM_DIR" . "$HOME/src/nvm") - ("GUILE_AUTO_COMPILE" . "0"))) - -(define allow-downgrades - "--allow-downgrades ") - (define pull-guix "guix pull ") @@ -108,77 +67,59 @@ and reconfigure-home-)) -(define home-aliases - `(("grep" . "grep --color=auto ") - ("ll" . "ls -l ") - ("ls" . "ls -p --color=auto ") - ("pull-guix" . ,pull-guix) - ("pull-guix-" . ,pull-guix-) - ("reconfigure-home" . ,reconfigure-home) - ("reconfigure-home-" . ,reconfigure-home-) - ("reconfigure-system" . ,reconfigure-system) - ("reconfigure-system-" . ,reconfigure-system-) - ("system-update" . ,system-update) - ("system-update-" . ,system-update-))) - -(define bash-profile-target - (string-append config-prefix - ".bash_profile")) - -(define bash-profile - (local-file bash-profile-target - "bash_profile")) - -(define home-bash-profile - `(,bash-profile)) - -(define bashrc-target - (string-append config-prefix - ".bashrc")) - -(define bashrc - (local-file bashrc-target - "bashrc")) - -(define home-bashrc - `(,bashrc)) - -(define bash-configuration - (home-bash-configuration (environment-variables home-env-vars) - (aliases home-aliases) - (bash-profile home-bash-profile) - (bashrc home-bashrc))) - -(define home-bash-service - (service home-bash-service-type - bash-configuration)) - -(define emacs-init - (local-file "emacs.el")) - -(define git-config - (local-file "git.config")) - -(define gsad-source - (local-file "guix-shell-authorized-directories")) - -(define ssh-config - (local-file "ssh.config")) - -(define home-files - `((".config/git/config" ,git-config) - (".config/guix/shell-authorized-directories" ,gsad-source) - (".emacs" ,emacs-init) - (".ssh/config" ,ssh-config))) - -(define configuration-files-service - (simple-service 'configuration-files - home-files-service-type - home-files)) - -(define services - `(,home-bash-service - ,configuration-files-service)) - -(home-environment (packages packages) - (services services)) +(home-environment + (packages (map (compose list + specification->package+output) + '("cpupower" + "dconf-editor" + "emacs" + "emacs-aggressive-indent" + "font-google-noto" + "git" + "git-lfs" + "gnome-shell-extension-forge" + "gnome-tweaks" + "gnupg" + "guile" + "guile-spec" + "icecat" + "icedove" + "jami" + "libreoffice" + "newsboat" + "pwgen" + "seahorse" + "sicp" + "trezor-agent" + "unzip" + "zip"))) + (services + `(,(service home-bash-service-type + (home-bash-configuration + (environment-variables '(("EDITOR" . "emacs") + ("NVM_DIR" . "$HOME/src/nvm") + ("GUILE_AUTO_COMPILE" . "0"))) + (aliases `(("grep" . "grep --color=auto ") + ("ll" . "ls -l ") + ("ls" . "ls -p --color=auto ") + ("pull-guix" . ,pull-guix) + ("pull-guix-" . ,pull-guix-) + ("reconfigure-home" . ,reconfigure-home) + ("reconfigure-home-" . ,reconfigure-home-) + ("reconfigure-system" . ,reconfigure-system) + ("reconfigure-system-" . ,reconfigure-system-) + ("system-update" . ,system-update) + ("system-update-" . ,system-update-))) + (bash-profile `(,(local-file (string-append config-prefix + ".bash_profile") + "bash_profile"))) + (bashrc `(,(local-file (string-append config-prefix + ".bashrc") + "bashrc"))))) + ,(simple-service 'configuration-files + home-files-service-type + `((".config/git/config" ,(local-file "git.config")) + (".config/guix/shell-authorized-directories" + ,(local-file "guix-shell-authorized-directories")) + (".emacs" ,(local-file "emacs.el")) + (".ssh/config" ,(local-file "ssh.config"))))))) -- cgit v1.2.3