summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-10-22 12:21:31 +0300
committerMarc Coquand <marc@mccd.space>2024-10-22 12:21:31 +0300
commitba51d8509f78361f3049900861f492e100116a8c (patch)
tree1e408ed789ecd8f3761ab9b4aa88b42e1af507f1
parent9fa6862f443b66c01895c3199502e4f628e4f69b (diff)
downloadguix-ba51d8509f78361f3049900861f492e100116a8c.tar.gz
guix-ba51d8509f78361f3049900861f492e100116a8c.tar.bz2
guix-ba51d8509f78361f3049900861f492e100116a8c.zip
.
-rw-r--r--home/bashrc1
-rw-r--r--home/dots/.emacs33
-rw-r--r--home/dots/.emacs.d/elisp/keymaps.el28
-rw-r--r--home/profile5
-rw-r--r--os/config.scm8
5 files changed, 57 insertions, 18 deletions
diff --git a/home/bashrc b/home/bashrc
index 9a3a2cf..c69c164 100644
--- a/home/bashrc
+++ b/home/bashrc
@@ -40,3 +40,4 @@ eval "$(zoxide init posix --hook prompt)"
if [ "$(tty)" = "/dev/tty1" ]; then
exec startx
fi
+
diff --git a/home/dots/.emacs b/home/dots/.emacs
index 9a931a1..ca901bc 100644
--- a/home/dots/.emacs
+++ b/home/dots/.emacs
@@ -186,11 +186,11 @@
:bind
(("C-c C-g g" . guix)
("C-c C-g o" . (lambda ()
- (interactive)
- (sudo-shell-command "guix system reconfigure /home/mccd/system/os/config.scm")))
+ (interactive)
+ (sudo-shell-command "guix system reconfigure /home/mccd/system/os/config.scm")))
("C-c C-g h" . (lambda ()
- (interactive)
- (async-shell-command "guix home reconfigure ~/system/home/config.scm")))))
+ (interactive)
+ (async-shell-command "guix home reconfigure ~/system/home/config.scm")))))
(use-package nov
@@ -386,17 +386,26 @@
:init
(global-set-key (kbd "C-h D") 'devdocs-lookup))
+(use-package custom-keymaps
+ :load-path "elisp")
+
(use-package sgml-mode
:init
(add-to-list 'auto-mode-alist '("\\.njk\\'" . html-mode))
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . html-mode))
+ :config
+ (define-key html-mode-map (kbd "M-<TAB>") nil)
+ (define-key html-mode-map (kbd "M-o") nil)
:hook
- ;; TODO fix
- ((html-mode . (lambda ()
- (keymap-local-set (kbd "M-o") 'avy-goto-char-timer)))
- (html-mode . (lambda ()
- (setq sgml-basic-offset 8
- indent-tabs-mode t)))))
+ (css-mode . (lambda ((interactive)
+ (setq-local tab-width 2)
+ (setq sgml-basic-offset 2
+ indent-tabs-mode t))))))
+ (html-mode . (lambda ()
+ (interactive)
+ (setq-local tab-width 2)
+ (setq sgml-basic-offset 2
+ indent-tabs-mode t))))
(use-package eldoc
:ensure t
@@ -792,7 +801,7 @@
'(font-lock-type-face ((t (:foreground "black"))))
'(font-lock-variable-name-face ((t (:foreground "black"))))
'(fringe ((t (:background "white"))))
- '(header-line ((t (:inherit default :foreground "grey20" :box (:line-width (8 . 8) :color "#FFFFFF") :underline (:color "#e0e0e0" :style line :position 0) :family "Iosevka Aile"))))
+ '(header-line ((t (:inherit default :foreground "grey20" :box (:line-width (12 . 12) :color "#FFFFFF") :underline (:color "#e0e0e0" :style line :position 0) :family "Iosevka Aile"))))
'(highlight ((t (:background "azure2"))))
'(info-header-xref ((t (:inherit info-xref :underline (:color "RoyalBlue3" :style line :position t)))))
'(info-node ((t (:foreground "brown" :box (:line-width (4 . 4) :color "white") :slant italic :weight bold))))
@@ -801,7 +810,7 @@
'(markdown-inline-code-face ((t (:inherit markdown-code-face))))
'(markdown-pre-face ((t (:inherit markdown-code-face))))
'(mastodon-display-name-face ((t (:inherit nil :weight bold))))
- '(mode-line ((t (:background "gray95" :foreground "black" :box (:line-width (8 . 8) :style flat-button) :overline "#e0e0e0" :underline (:color "#e0e0e0" :style line :position t) :family "Iosevka Aile"))))
+ '(mode-line ((t (:background "gray95" :foreground "black" :box (:line-width (12 . 12) :style flat-button) :overline "white" :underline (:color "white" :style line :position t) :family "Iosevka Aile"))))
'(mode-line-emphasis ((t (:weight regular))))
'(mode-line-inactive ((t (:inherit mode-line :background "#fbfbfb" :foreground "grey60" :overline "#f9f9f9" :underline (:color "#f9f9f9" :style line :position 0) :weight light))))
'(mu4e-header-highlight-face ((t (:inherit hl-line :extend t :weight bold))))
diff --git a/home/dots/.emacs.d/elisp/keymaps.el b/home/dots/.emacs.d/elisp/keymaps.el
new file mode 100644
index 0000000..7c6d614
--- /dev/null
+++ b/home/dots/.emacs.d/elisp/keymaps.el
@@ -0,0 +1,28 @@
+(defvar keymaps-mode-map (make-sparse-keymap)
+ "Keymap for `keymaps-mode'")
+
+;;;###autoload
+(define-minor-mode keymaps-mode
+ "A minor mode so that my key settings override annoying major modes."
+ ;; If init-value is not set to t, this mode does not get enabled in
+ ;; `fundamental-mode' buffers even after doing \"(global-my-mode 1)\".
+ ;; More info: http://emacs.stackexchange.com/q/16693/115
+ :init-value t
+ :lighter " keymaps"
+ :keymap keymaps-mode-map)
+
+;;;###autoload
+(define-globalized-minor-mode global-keymaps-mode keymaps-mode keymaps-mode)
+
+;; https://github.com/jwiegley/use-package/blob/master/bind-key.el
+;; The keymaps in `emulation-mode-map-alists' take precedence over
+;; `minor-mode-map-alist'
+(add-to-list 'emulation-mode-map-alists `((keymaps-mode . ,keymaps-mode-map)))
+
+;; Turn off the minor mode in the minibuffer
+(defun turn-off-keymaps-mode ()
+ "Turn off keymaps-mode."
+ (keymaps-mode -1))
+(add-hook 'minibuffer-setup-hook #'turn-off-keymaps-mode)
+
+(provide 'custom-keymaps)
diff --git a/home/profile b/home/profile
index b8fa27f..f81bc8a 100644
--- a/home/profile
+++ b/home/profile
@@ -14,5 +14,6 @@ export HISTSIZE=65535
export HISTFILE=$HOME/.history
export STITCH_DIRECTORY=/home/mccd/notes
export STITCH_GREP_CMD=ugrep
-
-
+export GUIX_PROFILE="/home/mccd/.guix-profile"
+. "$GUIX_PROFILE/etc/profile"
+source /run/current-system/profile/etc/profile.d/nix.sh
diff --git a/os/config.scm b/os/config.scm
index 95086a5..6e2e188 100644
--- a/os/config.scm
+++ b/os/config.scm
@@ -12,7 +12,8 @@
(use-modules (gnu)
(nongnu packages linux)
(nongnu system linux-initrd))
-(use-service-modules cups desktop networking ssh xorg)
+(use-service-modules cups desktop networking ssh xorg nix)
+(use-package-modules package-management)
(operating-system
(kernel linux)
@@ -37,6 +38,7 @@
;; for packages and 'guix install PACKAGE' to install a package.
(packages (append (list (specification->package "emacs")
(specification->package "emacs-exwm")
+ (specification->package "nix")
(specification->package "mu")
(specification->package "guile")
(specification->package
@@ -46,6 +48,7 @@
;; services, run 'guix system search KEYWORD' in a terminal.
(services
(append (list (service cups-service-type)
+ (service nix-service-type)
(set-xorg-configuration
(xorg-configuration (keyboard-layout keyboard-layout))))
(modify-services %desktop-services
@@ -58,9 +61,6 @@
(append (list (local-file "./signing-key.pub"))
%default-authorized-guix-keys)))))))
- ;; This is the default list of services we
- ;; are appending to.
-
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(targets (list "/boot/efi"))