Test emacs config
This commit is contained in:
commit
3824d80662
|
@ -13,12 +13,12 @@
|
||||||
(column-number-mode 't) ; show current column in status bar
|
(column-number-mode 't) ; show current column in status bar
|
||||||
(set-fringe-mode 10)
|
(set-fringe-mode 10)
|
||||||
|
|
||||||
;; Indent 4 spaces by default. Use the "BSD" style for C-like languages.
|
;;;; Indent 4 spaces by default. Use the "BSD" style for C-like languages.
|
||||||
(setq c-default-style
|
;;(setq c-default-style
|
||||||
(quote ((java-mode . "java")
|
;; (quote ((java-mode . "java")
|
||||||
(awk-mode . "awk")
|
;; (awk-mode . "awk")
|
||||||
(other . "bsd")))
|
;; (other . "bsd")))
|
||||||
c-basic-offset 4)
|
;; c-basic-offset 4)
|
||||||
|
|
||||||
;; Use 4 spaces for one tab visually.
|
;; Use 4 spaces for one tab visually.
|
||||||
(setq tab-width 4)
|
(setq tab-width 4)
|
||||||
|
@ -51,11 +51,11 @@
|
||||||
(setq visible-bell t)
|
(setq visible-bell t)
|
||||||
|
|
||||||
; Advanced per-language checks.
|
; Advanced per-language checks.
|
||||||
(require 'flycheck)
|
;;(require 'flycheck)
|
||||||
(global-flycheck-mode 1)
|
;;(global-flycheck-mode 1)
|
||||||
(setq flycheck-checker-error-threshold 1000) ; for large go files and the escape checker
|
;;(setq flycheck-checker-error-threshold 1000) ; for large go files and the escape checker
|
||||||
|
;;
|
||||||
(setq flycheck-check-syntax-automatically '(mode-enabled save))
|
;;(setq flycheck-check-syntax-automatically '(mode-enabled save))
|
||||||
|
|
||||||
;; Backup
|
;; Backup
|
||||||
|
|
||||||
|
@ -91,12 +91,12 @@
|
||||||
;;(setq message-citation-line-function 'message-insert-formatted-citation-line)
|
;;(setq message-citation-line-function 'message-insert-formatted-citation-line)
|
||||||
;;(setq message-citation-line-format "On %d/%m/%Y %H:%M, %N wrote:")
|
;;(setq message-citation-line-format "On %d/%m/%Y %H:%M, %N wrote:")
|
||||||
|
|
||||||
(defun default-web-indent-mode ()
|
;;(defun default-web-indent-mode ()
|
||||||
(setq indent-tabs-mode nil)
|
;; (setq indent-tabs-mode nil)
|
||||||
(setq tab-width 2)
|
;; (setq tab-width 2)
|
||||||
(setq web-mode-markup-indent-offset 2)
|
;; (setq web-mode-markup-indent-offset 2)
|
||||||
(setq web-mode-css-indent-offset 2)
|
;; (setq web-mode-css-indent-offset 2)
|
||||||
(setq web-mode-code-indent-offset 2))
|
;; (setq web-mode-code-indent-offset 2))
|
||||||
|
|
||||||
(use-package doom-themes
|
(use-package doom-themes
|
||||||
:init (load-theme 'doom-nord t)
|
:init (load-theme 'doom-nord t)
|
||||||
|
@ -112,21 +112,21 @@
|
||||||
:config (lsp-enable-which-key-integration t)
|
:config (lsp-enable-which-key-integration t)
|
||||||
:hook (lsp-mode . electric-pair-mode))
|
:hook (lsp-mode . electric-pair-mode))
|
||||||
|
|
||||||
(use-package web-mode
|
;;(use-package web-mode
|
||||||
:mode ("\\.json\\'" . web-mode)
|
;; :mode ("\\.json\\'" . web-mode)
|
||||||
:mode ("\\.html?\\'" . web-mode)
|
;; :mode ("\\.html?\\'" . web-mode)
|
||||||
:mode ("\\.s?css\\'" . web-mode)
|
;; :mode ("\\.s?css\\'" . web-mode)
|
||||||
:mode ("\\.[jt]sx?\\'" . web-mode)
|
;; :mode ("\\.[jt]sx?\\'" . web-mode)
|
||||||
:hook (web-mode . lsp-deferred)
|
;; :hook (web-mode . lsp-deferred)
|
||||||
:hook (web-mode . default-web-indent-mode))
|
;; :hook (web-mode . default-web-indent-mode))
|
||||||
|
|
||||||
(use-package nix-mode
|
(use-package nix-mode
|
||||||
:mode ("\\.nix\\'" . nix-mode)
|
:mode ("\\.nix\\'" . nix-mode)
|
||||||
:hook (nix-mode . lsp-deferred))
|
:hook (nix-mode . lsp-deferred))
|
||||||
|
|
||||||
(use-package rust-mode
|
;;(use-package rust-mode
|
||||||
:hook (rust-mode . lsp-deferred)
|
;; :hook (rust-mode . lsp-deferred)
|
||||||
:config (setq rust-format-on-save t))
|
;; :config (setq rust-format-on-save t))
|
||||||
|
|
||||||
(use-package company
|
(use-package company
|
||||||
:config (setq company-idle-delay 0.25)
|
:config (setq company-idle-delay 0.25)
|
||||||
|
@ -139,48 +139,47 @@
|
||||||
:hook (yas-minor-mode . yas-reload-all)
|
:hook (yas-minor-mode . yas-reload-all)
|
||||||
:config (setq yas-snippet-dirs '("/etc/nixos/programs/emacs/snippets")))
|
:config (setq yas-snippet-dirs '("/etc/nixos/programs/emacs/snippets")))
|
||||||
|
|
||||||
(use-package prettier-js
|
;;(use-package prettier-js
|
||||||
:after (web-mode)
|
;; :after (web-mode)
|
||||||
:hook (web-mode . prettier-js-mode))
|
;; :hook (web-mode . prettier-js-mode))
|
||||||
|
;;
|
||||||
|
;;(use-package smartparens
|
||||||
|
;; :bind ("C-c s s" . sp-splice-sexp)
|
||||||
|
;; :bind ("C-c s r" . sp-rewrap-sexp))
|
||||||
|
;;
|
||||||
|
;;(use-package bbdb
|
||||||
|
;; :init (bbdb-initialize 'gnus 'message)
|
||||||
|
;; :init (bbdb-mua-auto-update-init 'gnus 'message)
|
||||||
|
;; :config (setq bbdb-file "~/Nextcloud/PRIVE/13_Org/contacts/bbdb")
|
||||||
|
;; :config (setq bbdb-mua-auto-update-p 'create))
|
||||||
|
|
||||||
(use-package smartparens
|
;;(use-package org
|
||||||
:bind ("C-c s s" . sp-splice-sexp)
|
;; (setq org-startup-folded t)
|
||||||
:bind ("C-c s r" . sp-rewrap-sexp))
|
;; (setq org-agenda-files
|
||||||
|
;; "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org"
|
||||||
(use-package bbdb
|
;; "~/Nextcloud/PRIVE/13_Org/perso.org")
|
||||||
:init (bbdb-initialize 'gnus 'message)
|
;; (setq org-refile-use-outline-path 'file)
|
||||||
:init (bbdb-mua-auto-update-init 'gnus 'message)
|
;; (setq org-refile-targets
|
||||||
:config (setq bbdb-file "~/Nextcloud/PRIVE/13_Org/contacts/bbdb")
|
;; '(("~/Nextcloud/PRIVE/13_Org/DRI.org" :maxlevel . 3)
|
||||||
:config (setq bbdb-mua-auto-update-p 'create))
|
;; ("~/Nextcloud/PRIVE/13_Org/perso.org" :level . 1)
|
||||||
|
;; ("~/Nextcloud/PRIVE/13_Org/pizajoffre.org" :level . 1)))
|
||||||
(use-package org
|
;; (setq org-todo-keywords
|
||||||
:config
|
;; '((sequence "TODO(t)" "PENDING(p)" "|" "CANCELLED(c)" "DONE(d)")))
|
||||||
(setq org-startup-folded t)
|
;; (setq org-todo-keyword-faces
|
||||||
(setq org-agenda-files
|
;; '(("TODO" . (:foreground "#c678dd" :weight bold))
|
||||||
"~/Nextcloud/PRIVE/13_Org/agenda-DRI.org"
|
;; ("PENDING" . (:background "#3f444a" :foreground "#ff6c6b" :weight bold))))
|
||||||
"~/Nextcloud/PRIVE/13_Org/perso.org")
|
;; (setq org-capture-templates
|
||||||
(setq org-refile-use-outline-path 'file)
|
;; '(("i" "Inbox" entry (file "~/Nextcloud/PRIVE/13_Org/DRI.org") "* TODO %i%?")
|
||||||
(setq org-refile-targets
|
;; ("a" "Agenda" entry (file "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org") "* TODO %i%?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))")))
|
||||||
'(("~/Nextcloud/PRIVE/13_Org/DRI.org" :maxlevel . 3)
|
;; (setq org-agenda-custom-commands
|
||||||
("~/Nextcloud/PRIVE/13_Org/perso.org" :level . 1)
|
;; '(("t" "Today" tags-todo "+LEVEL=1+CATEGORY=\"tasks\"|+SCHEDULED<=\"<today>\"|+DEADLINE<=\"<today>\""))))
|
||||||
("~/Nextcloud/PRIVE/13_Org/pizajoffre.org" :level . 1)))
|
;;
|
||||||
(setq org-todo-keywords
|
;;(setq org-caldav-url "https://next20.produhost.net/remote.php/dav/calendars/alexandre")
|
||||||
'((sequence "TODO(t)" "PENDING(p)" "|" "CANCELLED(c)" "DONE(d)")))
|
;;(setq org-caldav-calendars
|
||||||
(setq org-todo-keyword-faces
|
;; '((:calendar-id "alexandre-dri" :files ("~/Nextcloud/PRIVE/13_Org/agenda.org")
|
||||||
'(("TODO" . (:foreground "#c678dd" :weight bold))
|
;; :inbox "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org")
|
||||||
("PENDING" . (:background "#3f444a" :foreground "#ff6c6b" :weight bold))))
|
;; )
|
||||||
(setq org-capture-templates
|
;;)
|
||||||
'(("i" "Inbox" entry (file "~/Nextcloud/PRIVE/13_Org/DRI.org") "* TODO %i%?")
|
|
||||||
("a" "Agenda" entry (file "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org") "* TODO %i%?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))")))
|
|
||||||
(setq org-agenda-custom-commands
|
|
||||||
'(("t" "Today" tags-todo "+LEVEL=1+CATEGORY=\"tasks\"|+SCHEDULED<=\"<today>\"|+DEADLINE<=\"<today>\""))))
|
|
||||||
|
|
||||||
(setq org-caldav-url "https://next20.produhost.net/remote.php/dav/calendars/alexandre")
|
|
||||||
(setq org-caldav-calendars
|
|
||||||
'((:calendar-id "alexandre-dri" :files ("~/Nextcloud/PRIVE/13_Org/agenda.org")
|
|
||||||
:inbox "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
(use-package magit)
|
(use-package magit)
|
||||||
|
@ -297,3 +296,71 @@
|
||||||
(autoload 'gfm-mode "markdown-mode"
|
(autoload 'gfm-mode "markdown-mode"
|
||||||
"Major mode for editing GitHub Flavored Markdown files" t)
|
"Major mode for editing GitHub Flavored Markdown files" t)
|
||||||
(add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode))
|
(add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode))
|
||||||
|
|
||||||
|
;; org-mode
|
||||||
|
(require 'org)
|
||||||
|
(require 'remember)
|
||||||
|
(require 'org-mouse)
|
||||||
|
;; files with ".org" open in org-mode
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
|
||||||
|
;; one file org
|
||||||
|
(defvar org-gtd-file "~/Nextcloud/PRIVE/13_Org/DRI.org")
|
||||||
|
|
||||||
|
;; Open DRI.org when I hit C-c g
|
||||||
|
(defun gtd ()
|
||||||
|
"Open the GTD file."
|
||||||
|
(interactive)
|
||||||
|
(find-file org-gtd-file))
|
||||||
|
;; keybinding
|
||||||
|
(global-set-key "\C-cl" 'org-store-link)
|
||||||
|
(global-set-key "\C-ca" 'org-agenda)
|
||||||
|
(global-set-key "\C-cr" 'org-remember)
|
||||||
|
(global-set-key "\C-cg" 'gtd)
|
||||||
|
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-c l") 'org-store-link)
|
||||||
|
|
||||||
|
;; This seems like a good basic set of keywords to start out with:
|
||||||
|
|
||||||
|
(setq org-todo-keywords '((type "TODO" "SCHEDULED" "NEXT" "WAITING" "DONE")))
|
||||||
|
|
||||||
|
(setf org-todo-keyword-faces '(("NEXT" . (:foreground "yellow" :background "red" :bold t :weight bold))
|
||||||
|
("TODO" . (:foreground "cyan" :background "steelblue" :bold t :weight bold))
|
||||||
|
("WAITING" . (:foreground "yellow" :background "magenta2" :bold t :weight bold))
|
||||||
|
("DONE" . (:foreground "gray50" :background "gray30"))))
|
||||||
|
|
||||||
|
;; Remember support. This creates several files:
|
||||||
|
;;
|
||||||
|
;; ~/todo.org Where remembered TODO's are stored.
|
||||||
|
;; ~/journal.org Timestamped journal entries.
|
||||||
|
;; ~/remember.org All other notes
|
||||||
|
|
||||||
|
;; and a keybinding of "C-c r" for making quick notes from any buffer.
|
||||||
|
|
||||||
|
;; These bits of Remembered information must eventually be reviewed
|
||||||
|
;; and filed somewhere (perhaps in gtd.org, or in a project-specific
|
||||||
|
;; org file.) The out-of-sight, out-of-mind rule applies here---if I
|
||||||
|
;; don't review these auxiliary org-files, I'll probably forget what's
|
||||||
|
;; in them.
|
||||||
|
|
||||||
|
(require 'remember)
|
||||||
|
(setq org-reverse-note-order t) ;; note at beginning of file by default.
|
||||||
|
(setq org-default-notes-file "~/remember.org")
|
||||||
|
(setq remember-annotation-functions '(org-remember-annotation))
|
||||||
|
(setq remember-handler-functions '(org-remember-handler))
|
||||||
|
(add-hook 'remember-mode-hook 'org-remember-apply-template)
|
||||||
|
|
||||||
|
(setq org-remember-templates
|
||||||
|
'((?t "* TODO %?\n %i\n %a" "~/Nextcloud/PRIVE/13_Org/todo.org")
|
||||||
|
(?j "* %U %?\n\n %i\n %a" "~/Nextcloud/PRIVE/13_Org/journal.org")
|
||||||
|
(?i "* %^{Title}\n %i\n %a" "~/Nextcloud/PRIVE/13_Org/remember.org" "New Ideas")))
|
||||||
|
|
||||||
|
(global-set-key "\C-cr" 'org-remember)
|
||||||
|
(global-set-key [(f12)] 'org-remember)
|
||||||
|
|
||||||
|
|
||||||
|
;; widen category field a little
|
||||||
|
(setq org-agenda-prefix-format " %-17:c%?-12t% s")
|
||||||
|
|
||||||
|
;; https://gist.github.com/dandrews/4644693
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
./services.nix
|
./services.nix
|
||||||
./scanner.nix
|
./scanner.nix
|
||||||
../modules/common.nix
|
../modules/common.nix
|
||||||
|
../modules/smtp.nix
|
||||||
./dev.nix
|
./dev.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -118,7 +119,9 @@ fonts = {
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
# services.printing.enable = true;
|
# services.printing.enable = true;
|
||||||
|
services.avahi.enable = true;
|
||||||
|
services.printing.enable = true;
|
||||||
|
services.avahi.openFirewall = true;
|
||||||
# Enable sound.
|
# Enable sound.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|
||||||
|
@ -144,7 +147,6 @@ lp" ];
|
||||||
home-manager
|
home-manager
|
||||||
neovim
|
neovim
|
||||||
git
|
git
|
||||||
tmux
|
|
||||||
ncdu
|
ncdu
|
||||||
rclone
|
rclone
|
||||||
borgbackup
|
borgbackup
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"libsane-dsseries"
|
"libsane-dsseries"
|
||||||
]);
|
]);
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
services.printing.drivers = [ pkgs.brlaser ];
|
services.printing.drivers = [ pkgs.brlaser pkgs.hplip ];
|
||||||
# Enable sane and brscan4 for DSP-7055
|
# Enable sane and brscan4 for DSP-7055
|
||||||
hardware = {
|
hardware = {
|
||||||
sane = {
|
sane = {
|
||||||
|
@ -19,6 +19,7 @@
|
||||||
brscan4 = {
|
brscan4 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
extraBackends = [ pkgs.hplipWithPlugin ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,3 +142,5 @@ assign [class="emacs"] $ws2
|
||||||
# programmes au démarrage
|
# programmes au démarrage
|
||||||
exec --no-startup-id nm-applet
|
exec --no-startup-id nm-applet
|
||||||
exec --no-startup-id nextcloud
|
exec --no-startup-id nextcloud
|
||||||
|
exec --no-startup-id vlc
|
||||||
|
exec --no-startup-id guake
|
||||||
|
|
|
@ -11,7 +11,11 @@
|
||||||
./i3status.nix
|
./i3status.nix
|
||||||
./neovim.nix
|
./neovim.nix
|
||||||
./himalaya.nix
|
./himalaya.nix
|
||||||
|
../../../modules/tmux.nix
|
||||||
];
|
];
|
||||||
|
home.stateVersion = "21.11";
|
||||||
|
home.username = "alexandre";
|
||||||
|
home.homeDirectory = "/home/alexandre";
|
||||||
home.keyboard = {
|
home.keyboard = {
|
||||||
layout = "fr";
|
layout = "fr";
|
||||||
variant = "bepo";
|
variant = "bepo";
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
jq
|
jq
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
libreoffice
|
libreoffice
|
||||||
htop
|
btop
|
||||||
neomutt
|
neomutt
|
||||||
notmuch
|
notmuch
|
||||||
isync
|
isync
|
||||||
|
@ -30,5 +30,7 @@
|
||||||
zlib
|
zlib
|
||||||
python3
|
python3
|
||||||
nodejs
|
nodejs
|
||||||
|
vlc
|
||||||
|
guake
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
programs.msmtp = {
|
||||||
|
enable = true;
|
||||||
|
accounts.default = {
|
||||||
|
auth = true;
|
||||||
|
tls = true;
|
||||||
|
host = "ssl0.ovh.net";
|
||||||
|
from = "supervision@pizzajoff.re";
|
||||||
|
user = "supervision@pizzajoff.re";
|
||||||
|
passwordeval = "cat /tmp/fic";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -14,6 +14,10 @@
|
||||||
tmuxPlugins.better-mouse-mode
|
tmuxPlugins.better-mouse-mode
|
||||||
tmuxPlugins.sidebar
|
tmuxPlugins.sidebar
|
||||||
tmuxPlugins.nord
|
tmuxPlugins.nord
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
# tmuxPlugins.tmux-power
|
||||||
|
>>>>>>> 81fd413a21a3746680efd2260ca947a9bbfc0732
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
Loading…
Reference in New Issue