diff --git a/hosts/dell-5590/nixpkgs/configs/init.el b/hosts/dell-5590/nixpkgs/configs/init.el index ed9e55e..dabd4b3 100644 --- a/hosts/dell-5590/nixpkgs/configs/init.el +++ b/hosts/dell-5590/nixpkgs/configs/init.el @@ -13,12 +13,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) @@ -51,11 +51,11 @@ (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 - -(setq flycheck-check-syntax-automatically '(mode-enabled save)) +;;(require 'flycheck) +;;(global-flycheck-mode 1) +;;(setq flycheck-checker-error-threshold 1000) ; for large go files and the escape checker +;; +;;(setq flycheck-check-syntax-automatically '(mode-enabled save)) ;; Backup @@ -91,12 +91,12 @@ ;;(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) @@ -112,21 +112,21 @@ :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) @@ -139,48 +139,47 @@ :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 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 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 org +;; (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) @@ -297,3 +296,71 @@ (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-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 + diff --git a/hosts/x201/nixos/configuration.nix b/hosts/x201/nixos/configuration.nix index 8acb98d..1d0fac8 100644 --- a/hosts/x201/nixos/configuration.nix +++ b/hosts/x201/nixos/configuration.nix @@ -12,6 +12,7 @@ ./services.nix ./scanner.nix ../modules/common.nix + ../modules/smtp.nix ./dev.nix ]; @@ -118,7 +119,9 @@ fonts = { # Enable CUPS to print documents. # services.printing.enable = true; - + services.avahi.enable = true; + services.printing.enable = true; + services.avahi.openFirewall = true; # Enable sound. sound.enable = true; @@ -144,7 +147,6 @@ lp" ]; home-manager neovim git - tmux ncdu rclone borgbackup diff --git a/hosts/x201/nixos/scanner.nix b/hosts/x201/nixos/scanner.nix index 94ba7ec..d212fdb 100644 --- a/hosts/x201/nixos/scanner.nix +++ b/hosts/x201/nixos/scanner.nix @@ -11,7 +11,7 @@ "libsane-dsseries" ]); services.printing.enable = true; - services.printing.drivers = [ pkgs.brlaser ]; + services.printing.drivers = [ pkgs.brlaser pkgs.hplip ]; # Enable sane and brscan4 for DSP-7055 hardware = { sane = { @@ -19,6 +19,7 @@ brscan4 = { enable = true; }; + extraBackends = [ pkgs.hplipWithPlugin ]; }; }; } diff --git a/hosts/x201/nixpkgs/configs/i3config b/hosts/x201/nixpkgs/configs/i3config index f0cf354..a4b0d82 100644 --- a/hosts/x201/nixpkgs/configs/i3config +++ b/hosts/x201/nixpkgs/configs/i3config @@ -142,3 +142,5 @@ assign [class="emacs"] $ws2 # programmes au démarrage exec --no-startup-id nm-applet exec --no-startup-id nextcloud +exec --no-startup-id vlc +exec --no-startup-id guake diff --git a/hosts/x201/nixpkgs/home.nix b/hosts/x201/nixpkgs/home.nix index 62a7683..d9f51c2 100644 --- a/hosts/x201/nixpkgs/home.nix +++ b/hosts/x201/nixpkgs/home.nix @@ -11,7 +11,11 @@ ./i3status.nix ./neovim.nix ./himalaya.nix + ../../../modules/tmux.nix ]; + home.stateVersion = "21.11"; + home.username = "alexandre"; + home.homeDirectory = "/home/alexandre"; home.keyboard = { layout = "fr"; variant = "bepo"; diff --git a/hosts/x201/nixpkgs/packages.nix b/hosts/x201/nixpkgs/packages.nix index 5a2aaad..0c0d51c 100644 --- a/hosts/x201/nixpkgs/packages.nix +++ b/hosts/x201/nixpkgs/packages.nix @@ -3,7 +3,7 @@ jq nextcloud-client libreoffice - htop + btop neomutt notmuch isync @@ -30,5 +30,7 @@ zlib python3 nodejs + vlc + guake ]; } diff --git a/modules/smtp.nix b/modules/smtp.nix new file mode 100644 index 0000000..bcf890b --- /dev/null +++ b/modules/smtp.nix @@ -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"; + }; +}; +} diff --git a/modules/tmux.nix b/modules/tmux.nix index 578e027..93fd1fc 100644 --- a/modules/tmux.nix +++ b/modules/tmux.nix @@ -14,6 +14,10 @@ tmuxPlugins.better-mouse-mode tmuxPlugins.sidebar tmuxPlugins.nord +<<<<<<< HEAD +======= +# tmuxPlugins.tmux-power +>>>>>>> 81fd413a21a3746680efd2260ca947a9bbfc0732 ]; extraConfig = ''