diff --git a/docker/kuma.nix b/docker/kuma.nix new file mode 100644 index 0000000..b0e0913 --- /dev/null +++ b/docker/kuma.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: +let + host = "kuma.atlanticaweb.fr"; +in +{ + virtualisation = { + podman = { + enable = true; + dockerCompat = true; + }; + oci-containers = { + backend = "podman"; + containers.uptime-kuma = { + image = "louislam/uptime-kuma"; + autoStart = true; + ports = [ "3001:3001" ]; #server locahost : docker localhost + volumes = [ + "/srv/docker/app/data:/app/data" + ]; + }; + }; + }; +} diff --git a/hosts/dell-5590/nixos/configuration.nix b/hosts/dell-5590/nixos/configuration.nix index 8edeaec..559138a 100644 --- a/hosts/dell-5590/nixos/configuration.nix +++ b/hosts/dell-5590/nixos/configuration.nix @@ -141,6 +141,8 @@ source-sans-pro source-serif-pro iosevka + roboto-mono + fira-code ]; }; @@ -172,6 +174,13 @@ environment.systemPackages = [ pkgs.openvpn_24 ]; users.ntp.group = "ntp"; groups.ntp = {}; defaultUserShell = "/run/current-system/sw/bin/fish"; + extraUsers.oem = { + isNormalUser = true; + home = "/home/oem"; + description = "oem"; + extraGroups = [ "wheel" "networkmanager" "plocate" ]; + hashedPassword = "$6$TWZqEbF3s7f4Yx8s$xsUheHLM75u1IdvD/6AWnk9c8El2FgGiU5C4mnZddWl8hFaGF2nPojHqvj2l7muJwQ6c8f7A4MRpAKh7PezuN/"; + }; extraUsers.alexandre = { isNormalUser = true; home = "/home/alexandre"; diff --git a/hosts/dell-5590/nixos/services.nix b/hosts/dell-5590/nixos/services.nix index f545f0d..d05ff16 100644 --- a/hosts/dell-5590/nixos/services.nix +++ b/hosts/dell-5590/nixos/services.nix @@ -83,7 +83,7 @@ }; udev.extraRules = '' - ACTION=="remove", ENV{ID_BUS}=="usb", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", RUN+="${pkgs.i3lock}/bin/i3lock -i /home/alexandre/images/coffee_time.png"; + ACTION=="remove", ENV{ID_VENDOR_ID}=="1050", ENV{ID_MODEL_ID}=="0407", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/alexandre/.Xauthority" RUN+="${pkgs.sudo}/bin/sudo -u alexandre ${pkgs.xautolock}/bin/xautolock -locknow" ''; }; } diff --git a/hosts/dell-5590/nixos/vpn.nix b/hosts/dell-5590/nixos/vpn.nix new file mode 100644 index 0000000..f58e218 --- /dev/null +++ b/hosts/dell-5590/nixos/vpn.nix @@ -0,0 +1,15 @@ +{ pkgs, lib, config, ... }: +{ +environment.systemPackages = [ pkgs.openvpn_24 ]; + services.openvpn = { + servers = { + DRI = { + config = "config /home/alexandre/VPN/Serveur_VPN_pour_le_SI_DRI_alexandre_admin.ovpn"; + updateResolvConf = true; + up = "ip route add default gw 192.168.248.73\nroute add -host 185.86.178.201 dev wlp2s0 gw 192.168.1.1\necho nameserver $nameserver | ${pkgs.openresolv}/sbin/resolvconf -m 0 -a $dev"; + down = "ip route del default gw 192.168.248.73\nroute del -host 185.86.178.201 dev wlp2s0 gw 192.168.1.1\n${pkgs.openresolv}/sbin/resolvconf -d $dev"; + }; + }; + }; +} + diff --git a/hosts/dell-5590/nixpkgs/VPN.conf b/hosts/dell-5590/nixpkgs/VPN.conf new file mode 100644 index 0000000..d1040af --- /dev/null +++ b/hosts/dell-5590/nixpkgs/VPN.conf @@ -0,0 +1,18 @@ +client +remote '185.86.178.201' 1194 udp +pkcs12 '/home/alexandre/09_DRI/Serveur_VPN_pour_le_SI_DRI_alexandre/Serveur_VPN_pour_le_SI_DRI_alexandre.p12' +auth-user-pass +cipher AES-256-GCM +comp-lzo no +dev tun +proto udp +remote-cert-tls server +verify-x509-name 'C=FR, ST=Sarthe, L=Le Mans, O=DRI, emailAddress=support@dri.fr, CN=opn-vpn.si.dri.fr' subject +tls-auth '/home/alexandre/09_DRI/Serveur_VPN_pour_le_SI_DRI_alexandre/./Serveur_VPN_pour_le_SI_DRI_alexandre-tls.key' 1 +nobind +auth-nocache +script-security 2 +persist-key +persist-tun +user nm-openvpn +group nm-openvpn diff --git a/hosts/dell-5590/nixpkgs/configs/init.el b/hosts/dell-5590/nixpkgs/configs/init.el index ed9e55e..8056942 100644 --- a/hosts/dell-5590/nixpkgs/configs/init.el +++ b/hosts/dell-5590/nixpkgs/configs/init.el @@ -1,7 +1,9 @@ -;;(scroll-bar-mode -1) -;;(tool-bar-mode -1) -;;(tooltip-mode -1) -;;(menu-bar-mode -1) +;; Keyboard-centric user interface +(setq inhibit-startup-message t) +(scroll-bar-mode -1) +(tool-bar-mode -1) +(menu-bar-mode -1) + (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) ;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities` @@ -13,12 +15,12 @@ (column-number-mode 't) ; show current column in status bar (set-fringe-mode 10) -;; Indent 4 spaces by default. Use the "BSD" style for C-like languages. -(setq c-default-style - (quote ((java-mode . "java") - (awk-mode . "awk") - (other . "bsd"))) - c-basic-offset 4) +;;;; Indent 4 spaces by default. Use the "BSD" style for C-like languages. +;;(setq c-default-style +;; (quote ((java-mode . "java") +;; (awk-mode . "awk") +;; (other . "bsd"))) +;; c-basic-offset 4) ;; Use 4 spaces for one tab visually. (setq tab-width 4) @@ -43,19 +45,24 @@ ) whitespace-line-column 100) ; column at which whitespace-mode says the line is too long ;;(set-face-attribute 'default nil :font "JetBrains Mono" :height 150) -(global-set-key (kbd "C-c c") 'org-capture) -(global-set-key (kbd "C-c a") 'org-agenda) +;; themes +(use-package doom-themes + :init (load-theme 'doom-nord t) + :init (doom-themes-org-config)) (setq disabled-command-function nil) (setq inhibit-startup-screen t) (setq visible-bell t) -; Advanced per-language checks. -(require 'flycheck) -(global-flycheck-mode 1) -(setq flycheck-checker-error-threshold 1000) ; for large go files and the escape checker +;; Only y/n answers +(defalias 'yes-or-no-p 'y-or-n-p) -(setq flycheck-check-syntax-automatically '(mode-enabled save)) +;; Save what you enter into minibuffer prompts +(setq history-length 25) +(savehist-mode 1) + +;; Remember and restore the last cursor location of opened files +(save-place-mode 1) ;; Backup @@ -66,213 +73,71 @@ backup-by-copying t) ;; Copy all files, don't rename them. (setq vc-make-backup-files t) (setq backup-directory-alist '(("" . "~/.emacs.d/backup"))) +(defvar emacs-autosave-directory + (concat user-emacs-directory "autosaves/") + "This variable dictates where to put auto saves. It is set to a + directory called autosaves located wherever your .emacs.d/ is + located.") + +;; Sets all files to be backed up and auto saved in a single directory. +(setq backup-directory-alist + `((".*" . ,emacs-autosave-directory)) + auto-save-file-name-transforms + `((".*" ,emacs-autosave-directory t))) + (setq calendar-week-start-day 1) -(setq user-full-name "Alexandre LUCAZEAU") -(setq user-mail-address "alexandre@dri.fr") -(setq mail-user-agent 'gnus-user-agent) - -;;(setq gnus-select-method -;; '(nnimap "dri" -;; (nnimap-address "dri.fr") -;; (nnimap-server-port 143) -;; (nnimap-stream starttls) -;; (nnimap-authinfo-file "~/.authinfo.gpg"))) -;; -;;(setq gnus-message-archive-group "nnimap+dri:Sent") -;;(setq gnus-gcc-mark-as-read t) -;;(setq nnmail-expiry-target "nnimap+dri:Trash") -;;(setq nnmail-expiry-wait 'immediate) -;;(setq send-mail-function 'smtpmail-send-it) -;;(setq message-send-mail-function 'smtpmail-send-it) -;;(setq smtpmail-smtp-server "dri.fr") -;;(setq smtpmail-smtp-service 587) -;;(setq message-citation-line-function 'message-insert-formatted-citation-line) -;;(setq message-citation-line-format "On %d/%m/%Y %H:%M, %N wrote:") - -(defun default-web-indent-mode () - (setq indent-tabs-mode nil) - (setq tab-width 2) - (setq web-mode-markup-indent-offset 2) - (setq web-mode-css-indent-offset 2) - (setq web-mode-code-indent-offset 2)) - -(use-package doom-themes - :init (load-theme 'doom-nord t) - :init (doom-themes-org-config)) - -(use-package direnv - :config (direnv-mode)) - -(use-package lsp-mode - :config (setq lsp-keymap-prefix "C-c l") - :config (setq lsp-signature-auto-activate t) - :config (setq lsp-enable-on-type-formatting nil) - :config (lsp-enable-which-key-integration t) - :hook (lsp-mode . electric-pair-mode)) - -(use-package web-mode - :mode ("\\.json\\'" . web-mode) - :mode ("\\.html?\\'" . web-mode) - :mode ("\\.s?css\\'" . web-mode) - :mode ("\\.[jt]sx?\\'" . web-mode) - :hook (web-mode . lsp-deferred) - :hook (web-mode . default-web-indent-mode)) (use-package nix-mode :mode ("\\.nix\\'" . nix-mode) :hook (nix-mode . lsp-deferred)) -(use-package rust-mode - :hook (rust-mode . lsp-deferred) - :config (setq rust-format-on-save t)) - -(use-package company - :config (setq company-idle-delay 0.25) - :config (setq company-minimum-prefix-length 1) - :bind (:map company-active-map ("" . company-select-next)) - :bind (:map company-active-map ("" . company-select-previous))) - -(use-package yasnippet - :hook (lsp-mode . yas-minor-mode) - :hook (yas-minor-mode . yas-reload-all) - :config (setq yas-snippet-dirs '("/etc/nixos/programs/emacs/snippets"))) - -(use-package prettier-js - :after (web-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 org - :config - (setq org-startup-folded t) - (setq org-agenda-files - "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org" - "~/Nextcloud/PRIVE/13_Org/perso.org") - (setq org-refile-use-outline-path 'file) - (setq org-refile-targets - '(("~/Nextcloud/PRIVE/13_Org/DRI.org" :maxlevel . 3) - ("~/Nextcloud/PRIVE/13_Org/perso.org" :level . 1) - ("~/Nextcloud/PRIVE/13_Org/pizajoffre.org" :level . 1))) - (setq org-todo-keywords - '((sequence "TODO(t)" "PENDING(p)" "|" "CANCELLED(c)" "DONE(d)"))) - (setq org-todo-keyword-faces - '(("TODO" . (:foreground "#c678dd" :weight bold)) - ("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<=\"\"|+DEADLINE<=\"\"")))) - -(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) (setq magit-fetch-modules-jobs 16); fetch 16 modules in parallel -(use-package ledger-mode) - -(use-package projectile - :init (projectile-global-mode) - :config (setq projectile-enable-caching nil) - :config (setq projectile-project-search-path (cddr (directory-files "~/code" t))) - :custom (projectile-completion-system 'ivy) - :bind-keymap ("C-c p" . projectile-command-map)) - -(use-package counsel-projectile - :after (counsel projectile) - :init (counsel-projectile-mode)) - -(require 'yasnippet) -(yas-global-mode 1) - (use-package which-key :init (which-key-mode) :config (setq which-key-idle-delay 0.5)) -(setq TeX-PDF-mode t) +(autoload 'markdown-mode "markdown-mode" + "Major mode for editing Markdown files" t) +(add-to-list 'auto-mode-alist + '("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode)) -(require 'mu4e) -;;store org-mode links to messages -(require 'org-mu4e) -;;store link to message if in header view, not to header query -(setq org-mu4e-link-query-in-headers-mode nil) -(setq org-capture-templates - '(("t" "todo" entry (file+headline "~/todo.org" "Tasks") - "* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n"))) +(autoload 'gfm-mode "markdown-mode" + "Major mode for editing GitHub Flavored Markdown files" t) +(add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode)) -(setq mail-user-agent 'mu4e-user-agent) - (setq org-mu4e-link-query-in-headers-mode t) - (setq mu4e-maildir (expand-file-name "~/Maildir/dri/INBOX")) - (setq mu4e-get-mail-command "mbsync -a") - (setq mu4e-sent-folder "/Sent") - (setq mu4e-drafts-folder "/Drafts") - (setq mu4e-trash-folder "/Junk") - (setq mu4e-refile-folder "/INBOX/archives") - (setq mu4e-context-policy 'pick-first) - (setq mu4e-change-filenames-when-moving t) - (setq starttls-use-gnutls t) - (setq message-send-mail-function 'smtpmail-send-it) - (setq mu4e-update-interval 300) - (setq mu4e-use-fancy-chars t) - (setq mu4e-view-show-addresses t) - (setq mu4e-headers-show-threads t) - (setq mu4e-headers-skip-duplicates t) - (setq mail-user-agent 'mu4e-user-agent) - (defvaralias 'mu4e-compose-signature 'message-signature) - (setq-default mu4e-save-multiple-attachments-without-asking t) - (setq-default mu4e-view-show-addresses t) - (setq-default mu4e-confirm-quit nil) - (setq-default mu4e-hide-index-messages t) - (setq-default mu4e-index-update-in-background t) - (setq mu4e-compose-in-new-frame nil) - ;;rename files when moving - ;;NEEDED FOR MBSYNC - (setq mu4e-change-filenames-when-moving t) - (setq mu4e-html2text-command "iconv -c -t utf-8 | ${pkgs.pandoc}/bin/pandoc -f html -t plain") - (setq mu4e-view-show-images t) - (when (fboundp 'imagemagick-register-types) - (imagemagick-register-types)) - (setq message-kill-buffer-on-exit t) +(use-package org-caldav + :ensure t + :config + (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") + ) + ) + (setq org-caldav-delete-org-entries 'never) + (setq org-caldav-delete-calenda-entries 'never) + (setq org-icalendar-timezone "Europe/Paris") +) -(require 'org-msg) - (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t" - org-msg-startup "hidestars indent inlineimages" - org-msg-greeting-fmt "\nHi%s,\n\n" - org-msg-recipient-names '(("alexandre@dri.fr" . "Alexandre")) - org-msg-greeting-name-limit 3 - org-msg-default-alternatives '((new . (text html)) - (reply-to-html . (text html)) - (reply-to-text . (text))) - org-msg-convert-citation t - org-msg-signature " +;; org-mode +(require 'org) +(require 'org-mouse) +(setq org-startup-folded t + org-pretty-entities t + org-hide-emphasis-markers t + org-startup-with-inline-images t + org-image-actual-width '(300)) +;; files with ".org" open in org-mode +(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) +(setq org-agenda-files '("~/Nextcloud/PRIVE/13_Org/journal")) +;;;;;; - Regards, - - #+begin_signature - -- - *Alexandre - /One Emacs to rule them all/ - #+end_signature") - (org-msg-mode) ;; Org-Roam basic configuration - (setq org-directory (concat (getenv "HOME") "/Nextcloud/PRIVE/13_Org")) + (setq org-directory (concat (getenv "HOME") "/Nextcloud/PRIVE/13_Org/notes")) (use-package org-roam :after org @@ -288,12 +153,72 @@ ("C-c n o" . org-id-get-create) ("C-c n t" . org-roam-tag-add) ("C-c n a" . org-roam-alias-add) - ("C-c n l" . org-roam-buffer-toggle))))) -(autoload 'markdown-mode "markdown-mode" - "Major mode for editing Markdown files" t) -(add-to-list 'auto-mode-alist - '("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode)) + ("C-c n l" . org-roam-buffer-toggle) + ("C-c n o" . org-open-at-point) + ("C-M-i" . completion-at-point)))) + (:map org-roam-dailies-map + (("Y" . org-roam-dailies-capture-yesterday) + ("T" . org-roam-dailies-capture-tomorrow))) + :bind-keymap + ("C-c n d" . org-roam-dailies-map) + :config + (require 'org-roam-dailies) ;; Ensure the keymap is available + (org-roam-db-autosync-mode)) -(autoload 'gfm-mode "markdown-mode" - "Major mode for editing GitHub Flavored Markdown files" t) -(add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-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-cg" 'gtd) + +;; This seems like a good basic set of keywords to start out with: + +(setq org-todo-keywords '((type "TODO" "WAIT" "DONE"))) + +(setf org-todo-keyword-faces '(("TODO" . (:foreground "cyan" :background "steelblue" :bold t :weight bold)) + ("WAIT" . (:foreground "yellow" :background "magenta2" :bold t :weight bold)) + ("DONE" . (:foreground "gray50" :background "gray30")))) + +;; tags +(setq org-tag-alist '(("DEVIS" . ?d) ("PROJETS" . ?p) ("CLIENT" . ?c) ("PROSPECT" . ?o) ("INTERNE" . ?i) ("AO" . ?a) ("PJ" . ?z))) + + +(setq org-tag-faces + '( + ("DEVIS" . (:foreground "OrangeRed" :weight bold)) + ("PJ" . (:foreground "brightyellow" :weight bold)) + ("PROJET" . (:foreground "IndianRed1" :weight bold)) + ("INTERNE" . (:foreground "LimeGreen" :weight bold)) + ("CLIENT" . (:foreground "Orange" :weight bold)) + ("PROSPECT" . (:foreground "MediumPurple3" :weight bold)) + ("AO" . (:foreground "HotPink2" :weight bold)) + ) +) +;;; Org-journal +;; https://github.com/bastibe/org-journal +;; C-c C-j +(setq org-journal-date-prefix "#+TITLE: ") +(setq org-journal-time-prefix "* ") +(setq org-journal-date-format "%a, %Y-%m-%d") +(setq org-journal-file-format "%Y-%m-%d-journal.org") +(setq org-journal-dir "~/Nextcloud/PRIVE/13_Org/journal/") +(global-set-key "\C-cnj" 'org-journal-new-entry) +(require 'org-journal) + +;; tab bar +(when (< 26 emacs-major-version) + (tab-bar-mode 1) ;; enable tab bar + (setq tab-bar-show 1) ;; hide bar if <= 1 tabs open + (setq tab-bar-close-button-show nil) ;; hide tab close / X button + (setq tab-bar-new-tab-choice "*dashboard*");; buffer to show in new tabs + (setq tab-bar-tab-hints t) ;; show tab numbers + (setq tab-bar-format '(tab-bar-format-tabs tab-bar-separator))) + ;; elements to include in bar diff --git a/hosts/dell-5590/nixpkgs/configs/xfce4/terminal/accels.scm b/hosts/dell-5590/nixpkgs/configs/xfce4/terminal/accels.scm new file mode 100644 index 0000000..673bbea --- /dev/null +++ b/hosts/dell-5590/nixpkgs/configs/xfce4/terminal/accels.scm @@ -0,0 +1,58 @@ +; xfce4-terminal GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; +(gtk_accel_path "/terminal-window/goto-tab-2" "2") +(gtk_accel_path "/terminal-window/goto-tab-6" "6") +; (gtk_accel_path "/terminal-window/copy-input" "") +; (gtk_accel_path "/terminal-window/close-other-tabs" "") +; (gtk_accel_path "/terminal-window/move-tab-right" "Page_Down") +(gtk_accel_path "/terminal-window/goto-tab-7" "7") +; (gtk_accel_path "/terminal-window/set-title-color" "") +; (gtk_accel_path "/terminal-window/edit-menu" "") +; (gtk_accel_path "/terminal-window/zoom-menu" "") +(gtk_accel_path "/terminal-window/goto-tab-1" "1") +; (gtk_accel_path "/terminal-window/fullscreen" "F11") +; (gtk_accel_path "/terminal-window/read-only" "") +(gtk_accel_path "/terminal-window/goto-tab-5" "5") +; (gtk_accel_path "/terminal-window/preferences" "") +; (gtk_accel_path "/terminal-window/reset-and-clear" "") +; (gtk_accel_path "/terminal-window/about" "") +(gtk_accel_path "/terminal-window/goto-tab-4" "4") +; (gtk_accel_path "/terminal-window/close-window" "q") +; (gtk_accel_path "/terminal-window/reset" "") +; (gtk_accel_path "/terminal-window/save-contents" "") +(gtk_accel_path "/terminal-window/toggle-menubar" "F10") +; (gtk_accel_path "/terminal-window/copy" "c") +; (gtk_accel_path "/terminal-window/copy-html" "") +; (gtk_accel_path "/terminal-window/last-active-tab" "") +; (gtk_accel_path "/terminal-window/show-borders" "") +; (gtk_accel_path "/terminal-window/view-menu" "") +; (gtk_accel_path "/terminal-window/detach-tab" "d") +; (gtk_accel_path "/terminal-window/scroll-on-output" "") +; (gtk_accel_path "/terminal-window/show-toolbar" "") +; (gtk_accel_path "/terminal-window/next-tab" "Page_Down") +; (gtk_accel_path "/terminal-window/tabs-menu" "") +; (gtk_accel_path "/terminal-window/search-next" "") +; (gtk_accel_path "/terminal-window/search-prev" "") +; (gtk_accel_path "/terminal-window/undo-close-tab" "") +; (gtk_accel_path "/terminal-window/set-title" "s") +; (gtk_accel_path "/terminal-window/contents" "F1") +; (gtk_accel_path "/terminal-window/zoom-reset" "0") +; (gtk_accel_path "/terminal-window/close-tab" "w") +; (gtk_accel_path "/terminal-window/new-tab" "t") +; (gtk_accel_path "/terminal-window/new-window" "n") +; (gtk_accel_path "/terminal-window/terminal-menu" "") +; (gtk_accel_path "/terminal-window/show-menubar" "") +; (gtk_accel_path "/terminal-window/select-all" "a") +; (gtk_accel_path "/terminal-window/paste" "v") +(gtk_accel_path "/terminal-window/goto-tab-9" "9") +; (gtk_accel_path "/terminal-window/move-tab-left" "Page_Up") +; (gtk_accel_path "/terminal-window/search" "f") +; (gtk_accel_path "/terminal-window/file-menu" "") +; (gtk_accel_path "/terminal-window/prev-tab" "Page_Up") +; (gtk_accel_path "/terminal-window/paste-selection" "") +; (gtk_accel_path "/terminal-window/zoom-in" "plus") +; (gtk_accel_path "/terminal-window/zoom-out" "minus") +(gtk_accel_path "/terminal-window/goto-tab-8" "8") +; (gtk_accel_path "/terminal-window/help-menu" "") +(gtk_accel_path "/terminal-window/goto-tab-3" "3") diff --git a/hosts/dell-5590/nixpkgs/configs/xfce4/terminal/colorschemes/nord.theme b/hosts/dell-5590/nixpkgs/configs/xfce4/terminal/colorschemes/nord.theme new file mode 100644 index 0000000..5bdd426 --- /dev/null +++ b/hosts/dell-5590/nixpkgs/configs/xfce4/terminal/colorschemes/nord.theme @@ -0,0 +1,9 @@ +[Scheme] +Name=Nord +ColorCursor=#D8DEE9 +ColorForeground=#D8DEE9 +ColorBackground=#2E3440 +TabActivityColor=#88C0D0 +ColorPalette=#3B4252;#BF616A;#A3BE8C;#EBCB8B;#81A1C1;#B48EAD;#88C0D0;#E5E9F0;#4C566A;#BF616A;#A3BE8C;#EBCB8B;#81A1C1;#B48EAD;#8FBCBB;#ECEFF4 +ColorBold=#D8DEE9 +ColorBoldUseDefault=FALSE diff --git a/hosts/dell-5590/nixpkgs/configs/xfce4/terminal/terminalrc b/hosts/dell-5590/nixpkgs/configs/xfce4/terminal/terminalrc new file mode 100644 index 0000000..95a34dd --- /dev/null +++ b/hosts/dell-5590/nixpkgs/configs/xfce4/terminal/terminalrc @@ -0,0 +1,37 @@ +[Configuration] +ColorForeground=#D8DEE9 +ColorBackground=#2E3440 +ColorCursor=#D8DEE9 +ColorBold=#D8DEE9 +ColorBoldUseDefault=FALSE +ColorPalette=#3B4252;#BF616A;#A3BE8C;#EBCB8B;#81A1C1;#B48EAD;#88C0D0;#E5E9F0;#4C566A;#BF616A;#A3BE8C;#EBCB8B;#81A1C1;#B48EAD;#8FBCBB;#ECEFF4 +MiscAlwaysShowTabs=FALSE +MiscBell=FALSE +MiscBellUrgent=FALSE +MiscBordersDefault=FALSE +MiscCursorBlinks=FALSE +MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK +MiscDefaultGeometry=80x24 +MiscInheritGeometry=FALSE +MiscMenubarDefault=FALSE +MiscMouseAutohide=FALSE +MiscMouseWheelZoom=TRUE +MiscToolbarDefault=FALSE +MiscConfirmClose=TRUE +MiscCycleTabs=TRUE +MiscTabCloseButtons=TRUE +MiscTabCloseMiddleClick=TRUE +MiscTabPosition=GTK_POS_TOP +MiscHighlightUrls=TRUE +MiscMiddleClickOpensUri=FALSE +MiscCopyOnSelect=TRUE +MiscShowRelaunchDialog=TRUE +MiscRewrapOnResize=TRUE +MiscUseShiftArrowsToScroll=FALSE +MiscSlimTabs=FALSE +MiscNewTabAdjacent=FALSE +MiscSearchDialogOpacity=100 +MiscShowUnsafePasteDialog=TRUE +TabActivityColor=#88C0D0 +MiscRightClickAction=TERMINAL_RIGHT_CLICK_ACTION_CONTEXT_MENU + diff --git a/hosts/dell-5590/nixpkgs/emacs.nix b/hosts/dell-5590/nixpkgs/emacs.nix index 4990749..83fb028 100644 --- a/hosts/dell-5590/nixpkgs/emacs.nix +++ b/hosts/dell-5590/nixpkgs/emacs.nix @@ -1,12 +1,16 @@ -{ ... }: +{ pkgs, ... }: { +home.packages = with pkgs; [ + multimarkdown + ]; services.emacs.enable = true; programs.emacs = { enable = true; extraPackages = (epkgs: (with epkgs; [ use-package + dash doom-themes lsp-mode web-mode @@ -19,6 +23,7 @@ prettier-js smartparens org + org-journal org-roam org-msg org-caldav diff --git a/hosts/dell-5590/nixpkgs/git.nix b/hosts/dell-5590/nixpkgs/git.nix index c97de5a..97f8728 100644 --- a/hosts/dell-5590/nixpkgs/git.nix +++ b/hosts/dell-5590/nixpkgs/git.nix @@ -30,6 +30,6 @@ }; }; signing.key = "3C8ADB07A8217BD3"; - signing.signByDefault = true; + signing.signByDefault = false; }; } diff --git a/hosts/dell-5590/nixpkgs/home.nix b/hosts/dell-5590/nixpkgs/home.nix index a853394..f05e98b 100644 --- a/hosts/dell-5590/nixpkgs/home.nix +++ b/hosts/dell-5590/nixpkgs/home.nix @@ -10,7 +10,6 @@ ./mails.nix ./dunst.nix ./bat.nix - ./AstroNvim.nix # ./redshift.nix # ../../../modules/neovim.nix ../../../modules/rust.nix diff --git a/hosts/dell-5590/nixpkgs/packages.nix b/hosts/dell-5590/nixpkgs/packages.nix index bcecda9..7d47d26 100644 --- a/hosts/dell-5590/nixpkgs/packages.nix +++ b/hosts/dell-5590/nixpkgs/packages.nix @@ -66,10 +66,9 @@ openvpn_24 networkmanager-openvpn python39Packages.grip - super-productivity + linphone ]; nixpkgs.config.permittedInsecurePackages = [ "ferdi-5.8.1" - "electron-17.4.1" ]; } diff --git a/hosts/next/configuration.nix b/hosts/next/configuration.nix index ab3232a..7049d1d 100644 --- a/hosts/next/configuration.nix +++ b/hosts/next/configuration.nix @@ -9,8 +9,8 @@ ../modules/navidrome.nix ../modules/transmission.nix ../modules/prometheus-node.nix - ../docker/appsmith.nix - ../docker/baserow.nix +# ../docker/appsmith.nix +# ../docker/baserow.nix ./agenix.nix # ]; diff --git a/hosts/next/nextcloud.nix b/hosts/next/nextcloud.nix index 8204c14..250a47d 100644 --- a/hosts/next/nextcloud.nix +++ b/hosts/next/nextcloud.nix @@ -31,6 +31,14 @@ services.nginx = { proxyWebsockets = true; }; }; + "bookmark.atlanticaweb.fr" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://127.0.0.1:8080/"; + proxyWebsockets = true; + }; + }; }; }; @@ -40,7 +48,7 @@ security.acme.acceptTerms = true; # Actual Nextcloud Config services.nextcloud = { enable = true; - package = pkgs.nextcloud24; + package = pkgs.nextcloud25; hostName = "next.atlanticaweb.fr"; # Enable built-in virtual host management # Takes care of somewhat complicated setup diff --git a/hosts/web/webserver.nix b/hosts/web/webserver.nix index 28f0fec..a1db773 100644 --- a/hosts/web/webserver.nix +++ b/hosts/web/webserver.nix @@ -16,6 +16,10 @@ in encode gzip reverse_proxy http://localhost:3001 } + https://pocket.atlanticaweb.fr { + encode gzip + reverse_proxy http://localhost:3001 + } https://search.atlanticaweb.fr { reverse_proxy http://localhost:5000 } diff --git a/hosts/x201/nixos/dev.nix b/hosts/x201/nixos/dev.nix index 84e3e9f..f129033 100644 --- a/hosts/x201/nixos/dev.nix +++ b/hosts/x201/nixos/dev.nix @@ -4,6 +4,7 @@ # nodejs # ]; +virtualisation.docker.enable = true; # Enable PostgreSQL services.postgresql = { enable = true; diff --git a/hosts/x201/nixpkgs/configs/init.el b/hosts/x201/nixpkgs/configs/init.el index f091402..c6ed879 100644 --- a/hosts/x201/nixpkgs/configs/init.el +++ b/hosts/x201/nixpkgs/configs/init.el @@ -1,16 +1,62 @@ -;;(scroll-bar-mode -1) -;;(tool-bar-mode -1) -;;(tooltip-mode -1) -;;(menu-bar-mode -1) -(set-fringe-mode 10) -;;(set-face-attribute 'default nil :font "JetBrains Mono" :height 150) -(global-set-key (kbd "C-c c") 'org-capture) -(global-set-key (kbd "C-c a") 'org-agenda) +;; Keyboard-centric user interface +(setq inhibit-startup-message t) +(scroll-bar-mode -1) +(tool-bar-mode -1) +(menu-bar-mode -1) +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities` +;; and `package-pinned-packages`. Most users will not need or want to do this. +;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t) +(package-initialize) + + +(column-number-mode 't) ; show current column in status bar +(set-fringe-mode 10) + +;;;; Indent 4 spaces by default. Use the "BSD" style for C-like languages. +;;(setq c-default-style +;; (quote ((java-mode . "java") +;; (awk-mode . "awk") +;; (other . "bsd"))) +;; c-basic-offset 4) + +;; Use 4 spaces for one tab visually. +(setq tab-width 4) + +(show-paren-mode t) ; highlight matching open and close parentheses +(global-hl-line-mode) ; highlight current line +(global-visual-line-mode t) ; wrap long lines +(setq split-window-preferred-function + 'visual-fill-column-split-window-sensibly) ; wrap at window boundary + +(global-whitespace-mode) ; enable whitespace handling by default +(setq + whitespace-style ; see (apropos 'whitespace-style) + '(face ; viz via faces + trailing ; trailing blanks visualized + lines-tail ; lines beyond whitespace-line-column visualized + space-before-tab + space-after-tab + newline ; lines with only blanks visualized + indentation ; spaces used for indent when config wants tabs + empty ; empty lines at beginning or end or buffer + ) + whitespace-line-column 100) ; column at which whitespace-mode says the line is too long +;;(set-face-attribute 'default nil :font "JetBrains Mono" :height 150) + +;; themes +(use-package doom-themes + :init (load-theme 'doom-nord t) + :init (doom-themes-org-config)) (setq disabled-command-function nil) (setq inhibit-startup-screen t) (setq visible-bell t) -(setq flycheck-check-syntax-automatically '(mode-enabled save)) + +;; Only y/n answers +(defalias 'yes-or-no-p 'y-or-n-p) + ;; Backup @@ -21,6 +67,18 @@ backup-by-copying t) ;; Copy all files, don't rename them. (setq vc-make-backup-files t) (setq backup-directory-alist '(("" . "~/.emacs.d/backup"))) +(defvar emacs-autosave-directory + (concat user-emacs-directory "autosaves/") + "This variable dictates where to put auto saves. It is set to a + directory called autosaves located wherever your .emacs.d/ is + located.") + +;; Sets all files to be backed up and auto saved in a single directory. +(setq backup-directory-alist + `((".*" . ,emacs-autosave-directory)) + auto-save-file-name-transforms + `((".*" ,emacs-autosave-directory t))) + (setq calendar-week-start-day 1) @@ -28,60 +86,57 @@ (setq user-mail-address "alexandre@dri.fr") (setq mail-user-agent 'gnus-user-agent) -(setq gnus-select-method - '(nnimap "dri" - (nnimap-address "dri.fr") - (nnimap-server-port 143) - (nnimap-stream starttls) - (nnimap-authinfo-file "~/.authinfo.gpg"))) +;;(setq gnus-select-method +;; '(nnimap "dri" +;; (nnimap-address "dri.fr") +;; (nnimap-server-port 143) +;; (nnimap-stream starttls) +;; (nnimap-authinfo-file "~/.authinfo.gpg"))) +;; +;;(setq gnus-message-archive-group "nnimap+dri:Sent") +;;(setq gnus-gcc-mark-as-read t) +;;(setq nnmail-expiry-target "nnimap+dri:Trash") +;;(setq nnmail-expiry-wait 'immediate) +;;(setq send-mail-function 'smtpmail-send-it) +;;(setq message-send-mail-function 'smtpmail-send-it) +;;(setq smtpmail-smtp-server "dri.fr") +;;(setq smtpmail-smtp-service 587) +;;(setq message-citation-line-function 'message-insert-formatted-citation-line) +;;(setq message-citation-line-format "On %d/%m/%Y %H:%M, %N wrote:") -(setq gnus-message-archive-group "nnimap+dri:Sent") -(setq gnus-gcc-mark-as-read t) -(setq nnmail-expiry-target "nnimap+dri:Trash") -(setq nnmail-expiry-wait 'immediate) -(setq send-mail-function 'smtpmail-send-it) -(setq message-send-mail-function 'smtpmail-send-it) -(setq smtpmail-smtp-server "dri.fr") -(setq smtpmail-smtp-service 587) -(setq message-citation-line-function 'message-insert-formatted-citation-line) -(setq message-citation-line-format "On %d/%m/%Y %H:%M, %N wrote:") +;;(defun default-web-indent-mode () +;; (setq indent-tabs-mode nil) +;; (setq tab-width 2) +;; (setq web-mode-markup-indent-offset 2) +;; (setq web-mode-css-indent-offset 2) +;; (setq web-mode-code-indent-offset 2)) -(defun default-web-indent-mode () - (setq indent-tabs-mode nil) - (setq tab-width 2) - (setq web-mode-markup-indent-offset 2) - (setq web-mode-css-indent-offset 2) - (setq web-mode-code-indent-offset 2)) - -(use-package doom-themes - :init (load-theme 'doom-nord t) - :init (doom-themes-org-config)) (use-package direnv :config (direnv-mode)) -(use-package lsp-mode - :config (setq lsp-keymap-prefix "C-c l") - :config (setq lsp-signature-auto-activate t) - :config (setq lsp-enable-on-type-formatting nil) - :config (lsp-enable-which-key-integration t) - :hook (lsp-mode . electric-pair-mode)) +;; (use-package lsp-mode +;; :config (setq lsp-keymap-prefix "C-c l") +;; :config (setq lsp-signature-auto-activate t) +;; :config (setq lsp-enable-on-type-formatting nil) +;; :config (lsp-enable-which-key-integration t) +;; :hook (lsp-mode . electric-pair-mode)) -(use-package web-mode - :mode ("\\.json\\'" . web-mode) - :mode ("\\.html?\\'" . web-mode) - :mode ("\\.s?css\\'" . web-mode) - :mode ("\\.[jt]sx?\\'" . web-mode) - :hook (web-mode . lsp-deferred) - :hook (web-mode . default-web-indent-mode)) +;;(use-package web-mode +;; :mode ("\\.json\\'" . web-mode) +;; :mode ("\\.html?\\'" . web-mode) +;; :mode ("\\.s?css\\'" . web-mode) +;; :mode ("\\.[jt]sx?\\'" . web-mode) +;; :hook (web-mode . lsp-deferred) +;; :hook (web-mode . default-web-indent-mode)) (use-package nix-mode :mode ("\\.nix\\'" . nix-mode) :hook (nix-mode . lsp-deferred)) -(use-package rust-mode - :hook (rust-mode . lsp-deferred) - :config (setq rust-format-on-save t)) +;;(use-package rust-mode +;; :hook (rust-mode . lsp-deferred) +;; :config (setq rust-format-on-save t)) (use-package company :config (setq company-idle-delay 0.25) @@ -94,41 +149,53 @@ :hook (yas-minor-mode . yas-reload-all) :config (setq yas-snippet-dirs '("/etc/nixos/programs/emacs/snippets"))) -(use-package prettier-js - :after (web-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/13_Org/contacts/bbdb") - :config (setq bbdb-mua-auto-update-p 'create)) - -(use-package org - :config - (setq org-agenda-files - "~/Nextcloud/13_Org/agenda.org") - (setq org-refile-use-outline-path 'file) - (setq org-refile-targets - '(("~/Nextcloud/13_Org/DRI.org" :maxlevel . 3) - ("~/Nextcloud/13_Org/perso.org" :level . 1) - ("~/Nextcloud/13_Org/pizajoffre.org" :level . 1))) - (setq org-todo-keywords - '((sequence "TODO(t)" "PENDING(p)" "|" "CANCELLED(c)" "DONE(d)"))) - (setq org-todo-keyword-faces - '(("TODO" . (:foreground "#c678dd" :weight bold)) - ("PENDING" . (:background "#3f444a" :foreground "#ff6c6b" :weight bold)))) - (setq org-capture-templates - '(("i" "Inbox" entry (file "~/Nextcloud/13_Org/DRI.org") "* TODO %i%?") - ("a" "Agenda" entry (file "~/Nextcloud/13_Org/agenda.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<=\"\"|+DEADLINE<=\"\"")))) +;;(use-package prettier-js +;; :after (web-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 org +;; (setq org-startup-folded t) +;; (setq org-refile-use-outline-path 'file) +;; (setq org-refile-targets +;; '(("~/Nextcloud/PRIVE/13_Org/DRI.org" :maxlevel . 3) +;; ("~/Nextcloud/PRIVE/13_Org/perso.org" :level . 1) +;; ("~/Nextcloud/PRIVE/13_Org/pizajoffre.org" :level . 1))) +;; (setq org-todo-keywords +;; '((sequence "TODO(t)" "PENDING(p)" "|" "CANCELLED(c)" "DONE(d)"))) +;; (setq org-todo-keyword-faces +;; '(("TODO" . (:foreground "#c678dd" :weight bold)) +;; ("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<=\"\"|+DEADLINE<=\"\"")))) +;; +(use-package org-caldav + :ensure t + :config + (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") + ) + ) + (setq org-caldav-delete-org-entries 'never) + (setq org-caldav-delete-calenda-entries 'never) + (setq org-icalendar-timezone "Europe/Paris") +) (use-package magit) +(setq magit-fetch-modules-jobs 16); fetch 16 modules in parallel (use-package ledger-mode) @@ -143,8 +210,182 @@ :after (counsel projectile) :init (counsel-projectile-mode)) +(require 'yasnippet) +(yas-global-mode 1) + (use-package which-key :init (which-key-mode) :config (setq which-key-idle-delay 0.5)) (setq TeX-PDF-mode t) + +(require 'mu4e) +;;store org-mode links to messages +(require 'org-mu4e) +;;store link to message if in header view, not to header query +(setq org-mu4e-link-query-in-headers-mode nil) + +(setq mail-user-agent 'mu4e-user-agent) + (setq org-mu4e-link-query-in-headers-mode t) + (setq mu4e-maildir (expand-file-name "~/Maildir/dri/INBOX")) + (setq mu4e-get-mail-command "mbsync -a") + (setq mu4e-sent-folder "/Sent") + (setq mu4e-drafts-folder "/Drafts") + (setq mu4e-trash-folder "/Junk") + (setq mu4e-refile-folder "/INBOX/archives") + (setq mu4e-context-policy 'pick-first) + (setq mu4e-change-filenames-when-moving t) + (setq starttls-use-gnutls t) + (setq message-send-mail-function 'smtpmail-send-it) + (setq mu4e-update-interval 300) + (setq mu4e-use-fancy-chars t) + (setq mu4e-view-show-addresses t) + (setq mu4e-headers-show-threads t) + (setq mu4e-headers-skip-duplicates t) + (setq mail-user-agent 'mu4e-user-agent) + (defvaralias 'mu4e-compose-signature 'message-signature) + (setq-default mu4e-save-multiple-attachments-without-asking t) + (setq-default mu4e-view-show-addresses t) + (setq-default mu4e-confirm-quit nil) + (setq-default mu4e-hide-index-messages t) + (setq-default mu4e-index-update-in-background t) + (setq mu4e-compose-in-new-frame nil) + ;;rename files when moving + ;;NEEDED FOR MBSYNC + (setq mu4e-change-filenames-when-moving t) + (setq mu4e-html2text-command "iconv -c -t utf-8 | ${pkgs.pandoc}/bin/pandoc -f html -t plain") + (setq mu4e-view-show-images t) + (when (fboundp 'imagemagick-register-types) + (imagemagick-register-types)) + (setq message-kill-buffer-on-exit t) + +(require 'org-msg) + (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t" + org-msg-startup "hidestars indent inlineimages" + org-msg-greeting-fmt "\nHi%s,\n\n" + org-msg-recipient-names '(("alexandre@dri.fr" . "Alexandre")) + org-msg-greeting-name-limit 3 + org-msg-default-alternatives '((new . (text html)) + (reply-to-html . (text html)) + (reply-to-text . (text))) + org-msg-convert-citation t + org-msg-signature " + + Regards, + + #+begin_signature + -- + *Alexandre + /One Emacs to rule them all/ + #+end_signature") + (org-msg-mode) +(autoload 'markdown-mode "markdown-mode" + "Major mode for editing Markdown files" t) +(add-to-list 'auto-mode-alist + '("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode)) + +(autoload 'gfm-mode "markdown-mode" + "Major mode for editing GitHub Flavored Markdown files" t) +(add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode)) + +;; Org-Roam basic configuration + (setq org-directory (concat (getenv "HOME") "/Nextcloud/PRIVE/13_Org")) + + (use-package org-roam + :after org + :init (setq org-roam-v2-ack t) ;; Acknowledge V2 upgrade + :custom + (org-roam-directory (file-truename org-directory)) + :config + (org-roam-setup) + :bind (("C-c n f" . org-roam-node-find) + ("C-c n r" . org-roam-node-random) + (:map org-mode-map + (("C-c n i" . org-roam-node-insert) + ("C-c n o" . org-id-get-create) + ("C-c n t" . org-roam-tag-add) + ("C-c n a" . org-roam-alias-add) + ("C-c n l" . org-roam-buffer-toggle))))) + +;; org-mode +(require 'org) +(require 'remember) +(require 'org-mouse) +(setq org-startup-folded t + org-pretty-entities t + org-hide-emphasis-markers t + org-startup-with-inline-images t + org-image-actual-width '(300)) +;; files with ".org" open in org-mode +(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) + +(setq org-agenda-files '("~/Nextcloud/PRIVE/13_Org/agenda-DRI.org" "~/Nextcloud/PRIVE/13_Org/perso.org")) +;; 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) + +;; 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")))) + +;; tags +(setq org-tag-alist '(("@devis" . ?w) ("@projet" . ?h) ("@client" . ?h) ("@prospect" . ?h) ("interne" . ?l))) + + +(setq org-tag-faces + '( + ("DEVIS" . (:foreground "OrangeRed" :weight bold)) + ("@projet" . (:foreground "IndianRed1" :weight bold)) + ("interne" . (:foreground "LimeGreen" :weight bold)) + ) +) + + +;; 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. +(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 +(setq org-ellipsis "⤵") diff --git a/hosts/x201/nixpkgs/emacs.nix b/hosts/x201/nixpkgs/emacs.nix index 456e82f..0588fca 100644 --- a/hosts/x201/nixpkgs/emacs.nix +++ b/hosts/x201/nixpkgs/emacs.nix @@ -19,6 +19,7 @@ prettier-js smartparens org + org-roam magit bbdb projectile @@ -29,6 +30,7 @@ which-key elpaPackages.org ])); + }; home.file = { diff --git a/hosts/x201/nixpkgs/home.nix b/hosts/x201/nixpkgs/home.nix index d9f51c2..575a04a 100644 --- a/hosts/x201/nixpkgs/home.nix +++ b/hosts/x201/nixpkgs/home.nix @@ -9,7 +9,6 @@ ./mpd.nix ./emacs.nix ./i3status.nix - ./neovim.nix ./himalaya.nix ../../../modules/tmux.nix ]; diff --git a/modules/rust.nix b/modules/rust.nix new file mode 100644 index 0000000..c72c0e2 --- /dev/null +++ b/modules/rust.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ...}: +with import {}; +{ + home.packages = [ + pkgs.gcc + pkgs.rustc + pkgs.cargo + pkgs.cargo-edit + ]; +} diff --git a/modules/tmux.nix b/modules/tmux.nix index 0e4b17c..578e027 100644 --- a/modules/tmux.nix +++ b/modules/tmux.nix @@ -2,20 +2,18 @@ { programs.tmux = { enable = true; - shortcut = "a"; + shortcut = "b"; # aggressiveResize = true; -- Disabled to be iTerm-friendly baseIndex = 1; - newSession = true; +# newSession = true; # Stop tmux+escape craziness. escapeTime = 0; - # Force tmux to use /tmp for sockets (WSL2 compat) - secureSocket = false; + secureSocket = true; plugins = with pkgs; [ tmuxPlugins.better-mouse-mode tmuxPlugins.sidebar tmuxPlugins.nord -# tmuxPlugins.tmux-power ]; extraConfig = '' @@ -56,7 +54,7 @@ set -g set-titles on # Attach to a session if runs otherwise create a new one - new-session -n $HOST + new-session -n DRI ''; };