summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Paśnikowski <marekpasnikowski@protonmail.com>2022-11-22 12:35:43 +0100
committerMarek Paśnikowski <marekpasnikowski@protonmail.com>2022-11-22 12:35:43 +0100
commit8f4399de7ef21786b57e884fdd398fa4495d3842 (patch)
tree1b1d8e1a226af1fd97792de2c064897c7c85cf6e
parentbace3496ff383423b4236dfc1be3bbe868a54d99 (diff)
Reintegrate Guix Home
-rw-r--r--emacs.el63
-rw-r--r--home-configuration.scm175
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")))))))